Issue 136430
Summary [InstCombine] ninf should not be propagated
Labels miscompilation, llvm:instcombine, floating-point
Assignees dtcxzyw
Reporter dtcxzyw
    Reproducer: https://alive2.llvm.org/ce/z/cmneUX
```
define half @test_fcmp_select_maxnum(half %x) {
#0:
  %cmp2 = fcmp ogt half %x, 0x5bf8
  %sel2 = select nnan ninf nsz i1 %cmp2, half %x, half 0x5bf8
  ret half %sel2
}
=>
define half @test_fcmp_select_maxnum(half %x) {
#0:
 %sel2 = fmax ninf nsz half %x, 0x5bf8
  ret half %sel2
}
Transformation doesn't verify!

ERROR: Target is more poisonous than source

Example:
half %x = #xfc00 (-oo)

Source:
i1 %cmp2 = #x0 (0)
half %sel2 = #x5bf8 (255)

Target:
half %sel2 = poison
Source value: #x5bf8 (255)
Target value: poison

Summary:
  0 correct transformations
 1 incorrect transformations
  0 failed-to-prove transformations
  0 Alive2 errors
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to