[llvm] [SelectOpt] Add handling for Select-like operations. (PR #77284)
Sotiris Apostolakis via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 17 15:14:18 PST 2024
================
@@ -378,6 +378,15 @@ class TargetTransformInfoImplBase {
bool enableSelectOptimize() const { return true; }
+ bool shouldTreatInstructionLikeSelect(Instruction *I) {
+ // If the select is a logical-and/logical-or then it is better treated as a
+ // and/or by the backend.
+ using namespace llvm::PatternMatch;
+ return isa<SelectInst>(I) &&
----------------
sapostolakis wrote:
the added EnableOrLikeSelectOpt resolved my issue here
https://github.com/llvm/llvm-project/pull/77284
More information about the llvm-commits
mailing list