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
NewGVN miscompiles the following testcase:
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-grtev4-linux-gnu" %struct.spam.10 = type { i8*, i64 } define void @zot(%struct.spam.10* %arg1, %struct.spam.10* %arg2) align 32 { bb56: %tmp5 = getelementptr inbounds %struct.spam.10, %struct.spam.10* %arg1, i64 0, i32 0 %tmp6 = getelementptr inbounds %struct.spam.10, %struct.spam.10* %arg2, i64 0, i32 0 br label %bb57 bb57: %tmp59 = phi i1 [ false, %bb229 ], [ true, %bb56 ] %tmp60 = load i8*, i8** %tmp5, align 8 %tmp61 = load i8, i8* %tmp60, align 1 %tmp62 = icmp ne i8 %tmp61, 93 %tmp63 = or i1 %tmp59, %tmp62 br i1 %tmp63, label %bb229, label %bb237 bb229: ; load from tmp5 or tmp6 %tmp186 = load i8*, i8** %tmp6, align 8 %tmp209 = getelementptr inbounds i8, i8* %tmp186, i64 2 store i8* %tmp209, i8** %tmp5, align 8 br label %bb57 bb237: ret void }
The phiofops it creates uses a value that is modified inside the loop and needs to be reloaded. (https://alive2.llvm.org/ce/z/gAPk9q)
cc @nunoplopes @fhahn
The text was updated successfully, but these errors were encountered:
Another version without the double pointer indirection:
define void @src(i8* %p, i8* %q) { bb56: br label %bb57 bb57: %tmp59 = phi i1 [ false, %bb229 ], [ true, %bb56 ] %idx = phi i8 [0, %bb56], [%inc, %bb229] %tmp60 = load i8, i8* %p %tmp62 = icmp ne i8 %tmp60, 2 %tmp63 = or i1 %tmp59, %tmp62 br i1 %tmp63, label %bb229, label %bb237 bb229: %inc = add i8 %idx, 1 store i8 %inc, i8* %q br label %bb57 bb237: ret void }
And another one;
define void @src(i8* %p) { bb56: br label %bb57 bb57: %tmp59 = phi i1 [ false, %bb229 ], [ true, %bb56 ] %tmp60 = load i8, i8* %p %tmp62 = icmp ne i8 %tmp60, 2 %tmp63 = or i1 %tmp59, %tmp62 br i1 %tmp63, label %bb229, label %bb237 bb229: call void @f() br label %bb57 bb237: ret void }
Sorry, something went wrong.
https://reviews.llvm.org/D117999
fixed: 24a49e9
No branches or pull requests
NewGVN miscompiles the following testcase:
The phiofops it creates uses a value that is modified inside the loop and needs to be reloaded.
(https://alive2.llvm.org/ce/z/gAPk9q)
cc @nunoplopes @fhahn
The text was updated successfully, but these errors were encountered: