[llvm] [InstCombine] Convert fshl(x, 0, y) to shl(x, and(y, BitWidth - 1)) when BitWidth is pow2 (PR #122362)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 23:54:33 PST 2025


================
@@ -2229,6 +2229,19 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
         return BitOp;
     }
 
+    // fshal(X, 0, Y) --> shl(X, and(Y, BitWidth - 1))
----------------
dtcxzyw wrote:

```suggestion
    // fshl(X, 0, Y) --> shl(X, and(Y, BitWidth - 1))
```


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


More information about the llvm-commits mailing list