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/InstSimplify/call.ll contains a few incorrect transformations when undef is involved.
For example, when %v is zero, there's no overflow, so can't fold this to undef:
define {i8, i1} @test_uadd3(i8 %v) { %0: %result = uadd_overflow i8 %v, undef ret {i8, i1} %result } => define {i8, i1} @test_uadd3(i8 %v) { %0: ret {i8, i1} undef } Transformation doesn't verify! ERROR: Value mismatch
Example: i8 %v = #x00 (0)
Source: {i8, i1} %result = { ?, #x0 }
Target: Source value: { ?, #x0 } Target value: { #x00, #x1 }
The text was updated successfully, but these errors were encountered:
assigned to @LebedevRI
Sorry, something went wrong.
https://reviews.llvm.org/D63065
Yep, undef is uh, mindmelting.
@Nuno - to summarize, and check myself - am i correct that we can fold the entire {u,s}{add,sub}.with.overflow(%a, undef) to {undef, 0}?
{u,s}{add,sub}.with.overflow(%a, undef)
{undef, 0}
To me, we can as per AliveToolkit/alive2#71 (comment) But is that checking what i think it is checking? If not, alive is missing insertvalue i guess?
insertvalue
https://reviews.llvm.org/D63065 Yep, undef is uh, mindmelting. @Nuno - to summarize, and check myself - am i correct that we can fold the entire {u,s}{add,sub}.with.overflow(%a, undef) to {undef, 0}? To me, we can as per AliveToolkit/alive2#71 (comment) But is that checking what i think it is checking? If not, alive is missing insertvalue i guess?
It is proving exactly what you want; the transformation you mention is correct per the undef semantics. You can fold to {undef, 0}.
undef
I didn't check with alive-tv, so if this suddenly is still incorrect, do CC me in the new bug (:
LebedevRI
No branches or pull requests
Extended Description
test/Transforms/InstSimplify/call.ll contains a few incorrect transformations when undef is involved.
For example, when %v is zero, there's no overflow, so can't fold this to undef:
define {i8, i1} @test_uadd3(i8 %v) {
%0:
%result = uadd_overflow i8 %v, undef
ret {i8, i1} %result
}
=>
define {i8, i1} @test_uadd3(i8 %v) {
%0:
ret {i8, i1} undef
}
Transformation doesn't verify!
ERROR: Value mismatch
Example:
i8 %v = #x00 (0)
Source:
{i8, i1} %result = { ?, #x0 }
Target:
Source value: { ?, #x0 }
Target value: { #x00, #x1 }
The text was updated successfully, but these errors were encountered: