[llvm] r306353 - [SROA] Clean up a test case a bit prior to adding more testing for
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 26 19:23:15 PDT 2017
Author: chandlerc
Date: Mon Jun 26 19:23:15 2017
New Revision: 306353
URL: http://llvm.org/viewvc/llvm-project?rev=306353&view=rev
Log:
[SROA] Clean up a test case a bit prior to adding more testing for
nonnull as part of fixing PR32902.
Modified:
llvm/trunk/test/Transforms/SROA/preserve-nonnull.ll
Modified: llvm/trunk/test/Transforms/SROA/preserve-nonnull.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SROA/preserve-nonnull.ll?rev=306353&r1=306352&r2=306353&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SROA/preserve-nonnull.ll (original)
+++ llvm/trunk/test/Transforms/SROA/preserve-nonnull.ll Mon Jun 26 19:23:15 2017
@@ -3,22 +3,20 @@
; Make sure that SROA doesn't lose nonnull metadata
; on loads from allocas that get optimized out.
-; CHECK-LABEL: define float* @yummy_nonnull
-; CHECK: [[RETURN:%(.*)]] = load float*, float** %arg, align 8
-; CHECK: [[ASSUME:%(.*)]] = icmp ne float* {{.*}}[[RETURN]], null
-; CHECK: call void @llvm.assume(i1 {{.*}}[[ASSUME]])
-; CHECK: ret float* {{.*}}[[RETURN]]
-
define float* @yummy_nonnull(float** %arg) {
-entry-block:
- %buf = alloca float*
-
- %_arg_i8 = bitcast float** %arg to i8*
- %_buf_i8 = bitcast float** %buf to i8*
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* %_buf_i8, i8* %_arg_i8, i64 8, i32 8, i1 false)
-
- %ret = load float*, float** %buf, align 8, !nonnull !0
- ret float* %ret
+; CHECK-LABEL: define float* @yummy_nonnull(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: %[[RETURN:.*]] = load float*, float** %arg, align 8
+; CHECK-NEXT: %[[ASSUME:.*]] = icmp ne float* %[[RETURN]], null
+; CHECK-NEXT: call void @llvm.assume(i1 %[[ASSUME]])
+; CHECK-NEXT: ret float* %[[RETURN]]
+entry:
+ %buf = alloca float*
+ %_arg_i8 = bitcast float** %arg to i8*
+ %_buf_i8 = bitcast float** %buf to i8*
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %_buf_i8, i8* %_arg_i8, i64 8, i32 8, i1 false)
+ %ret = load float*, float** %buf, align 8, !nonnull !0
+ ret float* %ret
}
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32, i1)
More information about the llvm-commits
mailing list