1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

[WebAssembly] Add getSetCCResultType placeholder override to handle vector compare results.

Necessary to get the rL335821 bugfix (which was reverted at rL335871) un-reverted.

llvm-svn: 335884
This commit is contained in:
Simon Pilgrim 2018-06-28 17:27:09 +00:00
parent 617e01192a
commit 76e0ff6b5d
2 changed files with 12 additions and 0 deletions

View File

@ -429,6 +429,15 @@ bool WebAssemblyTargetLowering::isIntDivCheap(EVT VT,
return true;
}
EVT WebAssemblyTargetLowering::getSetCCResultType(const DataLayout &DL,
LLVMContext &C,
EVT VT) const {
if (VT.isVector())
return VT.changeVectorElementTypeToInteger();
return TargetLowering::getSetCCResultType(DL, C, VT);
}
//===----------------------------------------------------------------------===//
// WebAssembly Lowering private implementation.
//===----------------------------------------------------------------------===//

View File

@ -64,6 +64,9 @@ class WebAssemblyTargetLowering final : public TargetLowering {
bool *Fast) const override;
bool isIntDivCheap(EVT VT, AttributeList Attr) const override;
EVT getSetCCResultType(const DataLayout &DL, LLVMContext &Context,
EVT VT) const override;
SDValue LowerCall(CallLoweringInfo &CLI,
SmallVectorImpl<SDValue> &InVals) const override;
bool CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF,