Skip to content

Commit

Permalink
[SystemZ] Handle vectors in getSetCCResultType
Browse files Browse the repository at this point in the history
I don't have a standalone testcase for this, but it should allow r193676
to be reapplied.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194148 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Richard Sandiford committed Nov 6, 2013
1 parent 02707cb commit d975a82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 7 additions & 2 deletions lib/Target/SystemZ/SystemZISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,13 @@ SystemZTargetLowering::SystemZTargetLowering(SystemZTargetMachine &tm)
MaxStoresPerMemsetOptSize = 0;
}

bool
SystemZTargetLowering::isFMAFasterThanFMulAndFAdd(EVT VT) const {
EVT SystemZTargetLowering::getSetCCResultType(LLVMContext &, EVT VT) const {
if (!VT.isVector())
return MVT::i32;
return VT.changeVectorElementTypeToInteger();
}

bool SystemZTargetLowering::isFMAFasterThanFMulAndFAdd(EVT VT) const {
VT = VT.getScalarType();

if (!VT.isSimple())
Expand Down
4 changes: 1 addition & 3 deletions lib/Target/SystemZ/SystemZISelLowering.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,7 @@ class SystemZTargetLowering : public TargetLowering {
virtual MVT getScalarShiftAmountTy(EVT LHSTy) const LLVM_OVERRIDE {
return MVT::i32;
}
virtual EVT getSetCCResultType(LLVMContext &, EVT) const LLVM_OVERRIDE {
return MVT::i32;
}
virtual EVT getSetCCResultType(LLVMContext &, EVT) const LLVM_OVERRIDE;
virtual bool isFMAFasterThanFMulAndFAdd(EVT VT) const LLVM_OVERRIDE;
virtual bool isFPImmLegal(const APFloat &Imm, EVT VT) const LLVM_OVERRIDE;
virtual bool isLegalAddressingMode(const AddrMode &AM, Type *Ty) const
Expand Down

0 comments on commit d975a82

Please sign in to comment.