[llvm] [InstCombine] Fix Failure to convert vector fp comparisons that can be represented as integers #82241 (PR #83274)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 07:44:52 PST 2024


================
@@ -7312,10 +7326,10 @@ Instruction *InstCombinerImpl::foldFCmpIntToFPConst(FCmpInst &I,
       RHSRoundInt.roundToIntegral(APFloat::rmNearestTiesToEven);
       if (RHS != RHSRoundInt) {
         if (P == FCmpInst::FCMP_OEQ || P == FCmpInst::FCMP_UEQ)
-          return replaceInstUsesWith(I, Builder.getFalse());
+          return replaceInstUsesWith(I, False);
----------------
dtcxzyw wrote:

```suggestion
          return replaceInstUsesWith(I, ConstantInt::getFalse(I.getType()));
```

https://github.com/llvm/llvm-project/pull/83274


More information about the llvm-commits mailing list