aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CIR/CodeGen/loop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CIR/CodeGen/loop.cpp')
-rw-r--r--clang/test/CIR/CodeGen/loop.cpp28
1 files changed, 4 insertions, 24 deletions
diff --git a/clang/test/CIR/CodeGen/loop.cpp b/clang/test/CIR/CodeGen/loop.cpp
index 3d28666..463434c 100644
--- a/clang/test/CIR/CodeGen/loop.cpp
+++ b/clang/test/CIR/CodeGen/loop.cpp
@@ -312,23 +312,10 @@ void l5() {
// CIR: %[[BEGIN_ADDR:.*]] = cir.alloca {{.*}} ["__begin1", init]
// CIR: %[[END_ADDR:.*]] = cir.alloca {{.*}} ["__end1", init]
// CIR: %[[X_ADDR:.*]] = cir.alloca {{.*}} ["x", init]
-// CIR: %[[ARR_CAST:.*]] = cir.cast array_to_ptrdecay %[[ARR_ADDR]] : {{.*}}
-// CIR: %[[ONE:.*]] = cir.const #cir.int<1> : !s32i
-// CIR: cir.store{{.*}} %[[ONE]], %[[ARR_CAST]]
-// CIR: %[[OFFSET1:.*]] = cir.const #cir.int<1> : !s64i
-// CIR: %[[STRIDE:.*]] = cir.ptr_stride %[[ARR_CAST]], %[[OFFSET1]] : ({{.*}}, {{.*}})
-// CIR: %[[TWO:.*]] = cir.const #cir.int<2> : !s32i
-// CIR: cir.store{{.*}} %[[TWO]], %[[STRIDE]]
-// CIR: %[[OFFSET2:.*]] = cir.const #cir.int<2> : !s64i
-// CIR: %[[STRIDE2:.*]] = cir.ptr_stride %[[ARR_CAST]], %[[OFFSET2]] : ({{.*}}, {{.*}})
-// CIR: %[[THREE:.*]] = cir.const #cir.int<3> : !s32i
-// CIR: cir.store{{.*}} %[[THREE]], %[[STRIDE2]]
-// CIR: %[[OFFSET3:.*]] = cir.const #cir.int<3> : !s64i
-// CIR: %[[STRIDE3:.*]] = cir.ptr_stride %[[ARR_CAST]], %[[OFFSET3]] : ({{.*}}, {{.*}})
-// CIR: %[[FOUR:.*]] = cir.const #cir.int<4> : !s32i
-// CIR: cir.store{{.*}} %[[FOUR]], %[[STRIDE3]]
+// CIR: %[[ARR_INIT:.*]] = cir.const #cir.const_array<[#cir.int<1> : !s32i, #cir.int<2> : !s32i, #cir.int<3> : !s32i, #cir.int<4> : !s32i]>
+// CIR: cir.store{{.*}} %[[ARR_INIT]], %[[ARR_ADDR]]
// CIR: cir.store{{.*}} %[[ARR_ADDR]], %[[RANGE_ADDR]]
-// CIR: %[[RANGE_LOAD:.*]] = cir.load{{.*}} %[[RANGE_ADDR]]
+// CIR: %[[RANGE_LOAD:.*]] = cir.load %[[RANGE_ADDR]]
// CIR: %[[RANGE_CAST:.*]] = cir.cast array_to_ptrdecay %[[RANGE_LOAD]] : {{.*}}
// CIR: cir.store{{.*}} %[[RANGE_CAST]], %[[BEGIN_ADDR]]
// CIR: %[[BEGIN:.*]] = cir.load{{.*}} %[[RANGE_ADDR]]
@@ -363,14 +350,7 @@ void l5() {
// LLVM: %[[X_ADDR:.*]] = alloca i32
// LLVM: br label %[[SETUP:.*]]
// LLVM: [[SETUP]]:
-// LLVM: %[[ARR_0:.*]] = getelementptr i32, ptr %[[ARR_ADDR]], i32 0
-// LLVM: store i32 1, ptr %[[ARR_0]]
-// LLVM: %[[ARR_1:.*]] = getelementptr i32, ptr %[[ARR_0]], i64 1
-// LLVM: store i32 2, ptr %[[ARR_1]]
-// LLVM: %[[ARR_2:.*]] = getelementptr i32, ptr %[[ARR_0]], i64 2
-// LLVM: store i32 3, ptr %[[ARR_2]]
-// LLVM: %[[ARR_3:.*]] = getelementptr i32, ptr %[[ARR_0]], i64 3
-// LLVM: store i32 4, ptr %[[ARR_3]]
+// LLVM: store [4 x i32] [i32 1, i32 2, i32 3, i32 4], ptr %[[ARR_ADDR]]
// LLVM: store ptr %[[ARR_ADDR]], ptr %[[RANGE_ADDR]]
// LLVM: %[[BEGIN:.*]] = load ptr, ptr %[[RANGE_ADDR]]
// LLVM: %[[BEGIN_CAST:.*]] = getelementptr i32, ptr %[[BEGIN]], i32 0