Fix memory-dereferenceable.ll test
authorArtur Pilipenko <apilipenko@azulsystems.com>
Thu, 21 May 2015 12:51:38 +0000 (12:51 +0000)
committerArtur Pilipenko <apilipenko@azulsystems.com>
Thu, 21 May 2015 12:51:38 +0000 (12:51 +0000)
One of the testcases introduced by D9365 had incorrect !dereferenceable metadata on load. It must fail but it doesn't due to incorrect order of CHECK/CHECK-NOT commands in test. Fixed both.

Reviewed By: sanjoy

Differential Revision: http://reviews.llvm.org/D9877

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237897 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/ValueTracking/memory-dereferenceable.ll

index c3aba3a7dc0dfe791db480a2804d1877c73a5965..dae64d7acc228aa1484e9999669fd83a0cfe4fa3 100644 (file)
@@ -16,12 +16,12 @@ define void @test(i32 addrspace(1)* dereferenceable(8) %dparam) gc "statepoint-e
 ; CHECK: %alloca
 ; CHECK: %dparam
 ; CHECK: %relocate
-; CHECK: %d4_load
-; CHECK: %d_or_null_non_null_load
 ; CHECK-NOT: %nparam
 ; CHECK-NOT: %nd_load
+; CHECK: %d4_load
 ; CHECK-NOT: %d2_load
 ; CHECK-NOT: %d_or_null_load
+; CHECK: %d_or_null_non_null_load
 entry:
     %globalptr = getelementptr inbounds [6 x i8], [6 x i8]* @globalstr, i32 0, i32 0
     %load1 = load i8, i8* %globalptr
@@ -35,7 +35,7 @@ entry:
     %load5 = load i32, i32 addrspace(1)* %nparam
 
     ; Load from a non-dereferenceable load
-    %nd_load = load i32*, i32** @globali32ptr, !dereferenceable !0
+    %nd_load = load i32*, i32** @globali32ptr
     %load6 = load i32, i32* %nd_load
 
     ; Load from a dereferenceable load