[llvm] r294927 - NewGVN: We really pass TBAA if we enable DCE and fix the test. Note that GVN eliminates no-use readonly/readnone calls, even if they are not marked nounwind. NewGVN only eliminates them if they are marked nounwind, and thus, trivially dead.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 12 15:24:47 PST 2017


Author: dannyb
Date: Sun Feb 12 17:24:47 2017
New Revision: 294927

URL: http://llvm.org/viewvc/llvm-project?rev=294927&view=rev
Log:
NewGVN: We really pass TBAA if we enable DCE and fix the test. Note that GVN eliminates no-use readonly/readnone calls, even if they are not marked nounwind. NewGVN only eliminates them if they are marked nounwind, and thus, trivially dead.

Modified:
    llvm/trunk/test/Transforms/NewGVN/tbaa.ll

Modified: llvm/trunk/test/Transforms/NewGVN/tbaa.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/NewGVN/tbaa.ll?rev=294927&r1=294926&r2=294927&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/NewGVN/tbaa.ll (original)
+++ llvm/trunk/test/Transforms/NewGVN/tbaa.ll Sun Feb 12 17:24:47 2017
@@ -1,5 +1,7 @@
-; XFAIL: *
-; RUN: opt -tbaa -basicaa -newgvn -S < %s | FileCheck %s
+; NewGVN lets DCE take care of the dead code
+; Some of it is gotten, some of it is not, because NewGVN does
+; not attempt to spend large amounts of time doing DCE
+; RUN: opt -tbaa -basicaa -newgvn -dce -S < %s | FileCheck %s
 
 define i32 @test1(i8* %p, i8* %q) {
 ; CHECK: @test1(i8* %p, i8* %q)
@@ -104,7 +106,7 @@ define i32 @test9(i32* %p, i32* %q) {
 
 
 declare void @clobber()
-declare i32 @foo(i8*) readonly
+declare i32 @foo(i8*) readonly nounwind
 
 ; CHECK: [[TAGC]] = !{[[TYPEC:!.*]], [[TYPEC]], i64 0}
 ; CHECK: [[TYPEC]] = !{!"C", [[TYPEA:!.*]]}




More information about the llvm-commits mailing list