[llvm] be93ba1 - [CVP] Add another non null test (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 20 04:06:04 PDT 2020
Author: Nikita Popov
Date: 2020-06-20T13:05:42+02:00
New Revision: be93ba1fd608cf9bef0a414c3193dff398c80c44
URL: https://github.com/llvm/llvm-project/commit/be93ba1fd608cf9bef0a414c3193dff398c80c44
DIFF: https://github.com/llvm/llvm-project/commit/be93ba1fd608cf9bef0a414c3193dff398c80c44.diff
LOG: [CVP] Add another non null test (NFC)
Added:
Modified:
llvm/test/Transforms/CorrelatedValuePropagation/non-null.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/CorrelatedValuePropagation/non-null.ll b/llvm/test/Transforms/CorrelatedValuePropagation/non-null.ll
index f470dc9cd265..e2f6b798b970 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/non-null.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/non-null.ll
@@ -61,7 +61,7 @@ bb:
define void @test3() {
; CHECK-LABEL: @test3(
-; CHECK-NEXT: [[PTR:%.*]] = alloca i8
+; CHECK-NEXT: [[PTR:%.*]] = alloca i8, align 1
; CHECK-NEXT: br label [[BB:%.*]]
; CHECK: bb:
; CHECK-NEXT: ret void
@@ -77,7 +77,7 @@ bb:
define void @test3_no_null_opt() #0 {
; CHECK-LABEL: @test3_no_null_opt(
-; CHECK-NEXT: [[PTR:%.*]] = alloca i8
+; CHECK-NEXT: [[PTR:%.*]] = alloca i8, align 1
; CHECK-NEXT: br label [[BB:%.*]]
; CHECK: bb:
; CHECK-NEXT: ret void
@@ -275,7 +275,7 @@ define void @test11(i8* %arg1, i8** %arg2) {
; CHECK: non_null:
; CHECK-NEXT: br label [[MERGE:%.*]]
; CHECK: null:
-; CHECK-NEXT: [[ANOTHER_ARG:%.*]] = alloca i8
+; CHECK-NEXT: [[ANOTHER_ARG:%.*]] = alloca i8, align 1
; CHECK-NEXT: br label [[MERGE]]
; CHECK: merge:
; CHECK-NEXT: [[MERGED_ARG:%.*]] = phi i8* [ [[ANOTHER_ARG]], [[NULL]] ], [ [[ARG1]], [[NON_NULL]] ]
@@ -333,4 +333,15 @@ merge:
ret void
}
+define i1 @test_store_same_block(i8* %arg) {
+; CHECK-LABEL: @test_store_same_block(
+; CHECK-NEXT: store i8 0, i8* [[ARG:%.*]], align 1
+; CHECK-NEXT: [[CMP:%.*]] = icmp ne i8* [[ARG]], null
+; CHECK-NEXT: ret i1 [[CMP]]
+;
+ store i8 0, i8* %arg
+ %cmp = icmp ne i8* %arg, null
+ ret i1 %cmp
+}
+
attributes #0 = { null_pointer_is_valid }
More information about the llvm-commits
mailing list