Issue 185266
Summary [FunctionAttrs] Unsound returned inference from nofpclass without noundef
Labels new issue
Assignees
Reporter cardigan1008
    Here is a miscompilation case:

```llvm
define float @use1_nofpclass_without_noundef(float nofpclass(nan) %x) {
  ret float %x
}

define float @parent_poison(float %a) {
  %r1 = call float @use1_nofpclass_without_noundef(float %a)
  ret float %a
}
```

Transformed into:

```llvm
define float @use1_nofpclass_without_noundef(float returned nofpclass(nan) %x) #0 {
  ret float %x
}

define float @parent_poison(float returned %a) #0 {
  %r2 = call float @use1_nofpclass_without_noundef(float %a)
  ret float %a
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
```

Alive2 proof: https://alive2.llvm.org/ce/z/FeNoja

This test case is generated when reviewing https://github.com/llvm/llvm-project/pull/183277. But I can't tell they're related. 
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to