Issue |
153743
|
Summary |
Support folding n-ary intrinsics in IRBuilderFolder/ConstantFolding
|
Labels |
llvm:instcombine,
constant-folding
|
Assignees |
|
Reporter |
lukel97
|
The motivation for this is https://github.com/llvm/llvm-project/pull/153069, where we would like to avoid regressions by being able to simplify unary and ternary intrinsics in IRBuilderFolder.
Currently we can only fold binary intrinsics. I presume we want to change the IRBuilderFolder interface from `FoldBinaryIntrinsic` -> `FoldIntrinsic`. I'm not sure what needs to change in ConstantFolder.cpp though. I see we have `ConstantFoldBinaryIntrinsic`, but we also seem to handle scalar intrinsics in `ConstantFoldCall`?
Some relevant discussion in https://github.com/llvm/llvm-project/pull/150931#discussion_r2236338130
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs