We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test Transforms/InstCombine/select.ll, fn copysign2: Simplified without vectors:
define float @src(float %x) { %0: %i = bitcast float %x to i32 %isneg = icmp slt i32 %i, 0 %r = select nsz i1 %isneg, float 42.000000, float -42.000000 ret float %r } => define float @tgt(float %x) { %0: %1 = fneg nsz float %x, exceptions=ignore %r = copysign float 42.000000, %1, exceptions=ignore ret float %r } Transformation doesn't verify! ERROR: Value mismatch Example: float %x = #x00000000 (+0.0) Source: i32 %i = #x00000000 (0) i1 %isneg = #x0 (0) float %r = #xc2280000 (-42) Target: float %1 = #x00000000 (+0.0) float %r = #x42280000 (42) Source value: #xc2280000 (-42) Target value: #x42280000 (42)
Dropping nsz from fneg makes it correct. https://alive2.llvm.org/ce/z/tNATrd
fneg
cc @rotateright @LebedevRI
The text was updated successfully, but these errors were encountered:
FTR https://reviews.llvm.org/D72643 added the fold
Sorry, something went wrong.
The transform in question also propagates FMF to the copysign call, and that's wrong too: https://alive2.llvm.org/ce/z/VwcVzn
[InstCombine] add test for copysign with FMF propagation; NFC
53dbedc
This is a miscompile as noted in #54077.
84812b9
rotateright
No branches or pull requests
Test Transforms/InstCombine/select.ll, fn copysign2:
Simplified without vectors:
Dropping nsz from
fneg
makes it correct.https://alive2.llvm.org/ce/z/tNATrd
cc @rotateright @LebedevRI
The text was updated successfully, but these errors were encountered: