[llvm] [ConstantFolding] Add ilogb in isMathLibCallNoop (PR #122582)

Vedant Paranjape via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 12 08:36:46 PST 2025


================

----------------
VedantParanjape wrote:

It seems this simplification is happening in EarlyCSE and not instcombine.

```
; *** IR Dump Before EarlyCSEPass on ilogb_const1 ***
define i32 @ilogb_const1() {
  %r = call i32 @ilogb(double -7.000000e+00)
  ret i32 %r
}
; *** IR Dump After EarlyCSEPass on ilogb_const1 ***
define i32 @ilogb_const1() {
  ret i32 2
}
```

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


More information about the llvm-commits mailing list