[llvm] [InstCombine] Ensure Safe Handling of Flags in foldFNegIntoConstant (PR #94148)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 04:12:14 PDT 2024
SahilPatidar wrote:
This is a test we are breaking:
```llvm
; With nsz and reassoc: Y - ((X * 5) + Y) --> X * -5
define float @sub_add_neg_x(float %x, float %y) {
; CHECK-LABEL: @sub_add_neg_x(
; CHECK-NEXT: [[R:%.*]] = fmul float [[X:%.*]], -5.000000e+00
; CHECK-NEXT: ret float [[R]]
;
%mul = fmul float %x, 5.000000e+00
%add = fadd float %mul, %y
%r = fsub nsz reassoc float %y, %add
ret float %r
}
```
https://github.com/llvm/llvm-project/pull/94148
More information about the llvm-commits
mailing list