[llvm-branch-commits] [llvm] [InstCombine] Fold fpto[su]i of llvm.trunc (PR #231414)

Nikita Popov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Oct 13 01:50:45 PDT 2026


================
@@ -2592,6 +2592,11 @@ static Instruction *foldFPtoI(Instruction &FI, InstCombiner &IC) {
   if (FPClass.isKnownNever(Mask))
     return IC.replaceInstUsesWith(FI, ConstantInt::getNullValue(FI.getType()));
 
+  // fpto{u/s}i (trunc X) --> fpto{u/s}i X
+  Value *Src = nullptr;
----------------
nikic wrote:

```suggestion
  Value *Src;
```

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


More information about the llvm-branch-commits mailing list