mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 03:53:04 +02:00
[WebAssembly] Implement isCheapToSpeculateCtlz and isCheapToSpeculateCttz.
This unbreaks test/CodeGen/WebAssembly/i32.ll and test/CodeGen/WebAssembly/i64.ll after r224899. llvm-svn: 253617
This commit is contained in:
parent
395b71970b
commit
73ba14a388
@ -228,6 +228,16 @@ WebAssemblyTargetLowering::getRegForInlineAsmConstraint(
|
||||
return TargetLowering::getRegForInlineAsmConstraint(TRI, Constraint, VT);
|
||||
}
|
||||
|
||||
bool WebAssemblyTargetLowering::isCheapToSpeculateCttz() const {
|
||||
// Assume ctz is a relatively cheap operation.
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WebAssemblyTargetLowering::isCheapToSpeculateCtlz() const {
|
||||
// Assume clz is a relatively cheap operation.
|
||||
return true;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// WebAssembly Lowering private implementation.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -52,6 +52,8 @@ private:
|
||||
std::pair<unsigned, const TargetRegisterClass *>
|
||||
getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
|
||||
StringRef Constraint, MVT VT) const override;
|
||||
bool isCheapToSpeculateCttz() const override;
|
||||
bool isCheapToSpeculateCtlz() const override;
|
||||
|
||||
SDValue LowerCall(CallLoweringInfo &CLI,
|
||||
SmallVectorImpl<SDValue> &InVals) const override;
|
||||
|
Loading…
Reference in New Issue
Block a user