[llvm] [InstCombine] Fold fcmp into select (PR #86482)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 11 08:49:13 PDT 2024
================
@@ -8020,6 +8020,10 @@ Instruction *InstCombinerImpl::visitFCmpInst(FCmpInst &I) {
if (Instruction *NV = foldOpIntoPhi(I, cast<PHINode>(LHSI)))
return NV;
break;
+ case Instruction::Select:
+ if (Instruction *NV = FoldOpIntoSelect(I, cast<SelectInst>(LHSI)))
+ return NV;
+ break;
----------------
goldsteinn wrote:
IMO here, we have the argument `FoldWithMultiUse` and it would be a bit confusing if we started to surreptitiously assume it.
https://github.com/llvm/llvm-project/pull/86482
More information about the llvm-commits
mailing list