[llvm] [IRBuilder] Fold binary intrinsics (PR #80743)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 22 00:23:47 PST 2024
================
@@ -117,6 +117,11 @@ class InstSimplifyFolder final : public IRBuilderFolder {
return simplifyCastInst(Op, V, DestTy, SQ);
}
+ Value *FoldBinaryIntrinsic(Intrinsic::ID ID, Value *LHS,
+ Value *RHS) const override {
+ return simplifyBinaryIntrinsic(ID, LHS->getType(), LHS, RHS, SQ, nullptr);
----------------
dtcxzyw wrote:
`LHS->getType()` is incorrect for `@llvm.is.fpclass`. I don't know why `abs/ctlz/cttz/is.fpclass` are treated as binary intrinsics.
https://github.com/llvm/llvm-project/pull/80743
More information about the llvm-commits
mailing list