|
17 | 17 |
|
18 | 18 | ; Check that the extractvalue operands are actually free in vector code.
|
19 | 19 |
|
20 |
| -; FORCED-LABEL: vector.body: ; preds = %vector.body, %vector.ph |
21 |
| -; FORCED-NEXT: %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
22 |
| -; FORCED-NEXT: %0 = add i32 %index, 0 |
23 |
| -; FORCED-NEXT: %1 = extractvalue { i64, i64 } %sv, 0 |
24 |
| -; FORCED-NEXT: %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %1, i64 0 |
| 20 | +; FORCED: [[E1:%.+]] = extractvalue { i64, i64 } %sv, 0 |
| 21 | +; FORCED-NEXT: %broadcast.splatinsert = insertelement <2 x i64> poison, i64 [[E1]], i64 0 |
25 | 22 | ; FORCED-NEXT: %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
|
26 |
| -; FORCED-NEXT: %2 = extractvalue { i64, i64 } %sv, 1 |
27 |
| -; FORCED-NEXT: %broadcast.splatinsert1 = insertelement <2 x i64> poison, i64 %2, i64 0 |
| 23 | +; FORCED-NEXT: [[E2:%.+]] = extractvalue { i64, i64 } %sv, 1 |
| 24 | +; FORCED-NEXT: %broadcast.splatinsert1 = insertelement <2 x i64> poison, i64 [[E2]], i64 0 |
28 | 25 | ; FORCED-NEXT: %broadcast.splat2 = shufflevector <2 x i64> %broadcast.splatinsert1, <2 x i64> poison, <2 x i32> zeroinitializer
|
29 |
| -; FORCED-NEXT: %3 = getelementptr i64, ptr %dst, i32 %0 |
30 |
| -; FORCED-NEXT: %4 = add <2 x i64> %broadcast.splat, %broadcast.splat2 |
31 |
| -; FORCED-NEXT: %5 = getelementptr i64, ptr %3, i32 0 |
32 |
| -; FORCED-NEXT: store <2 x i64> %4, ptr %5, align 4 |
| 26 | + |
| 27 | +; FORCED-LABEL: vector.body: ; preds = %vector.body, %vector.ph |
| 28 | +; FORCED-NEXT: %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 29 | +; FORCED-NEXT: [[IV_0:%.]] = add i32 %index, 0 |
| 30 | +; FORCED-NEXT: [[GEP:%.+]] = getelementptr i64, ptr %dst, i32 [[IV_0]] |
| 31 | +; FORCED-NEXT: [[ADD:%.+]] = add <2 x i64> %broadcast.splat, %broadcast.splat2 |
| 32 | +; FORCED-NEXT: [[GEP2:%.+]] = getelementptr i64, ptr [[GEP]], i32 0 |
| 33 | +; FORCED-NEXT: store <2 x i64> [[ADD]], ptr [[GEP2]], align 4 |
33 | 34 | ; FORCED-NEXT: %index.next = add nuw i32 %index, 2
|
34 |
| -; FORCED-NEXT: %6 = icmp eq i32 %index.next, 1000 |
35 |
| -; FORCED-NEXT: br i1 %6, label %middle.block, label %vector.body |
| 35 | +; FORCED-NEXT: [[C:%.+]] = icmp eq i32 %index.next, 1000 |
| 36 | +; FORCED-NEXT: br i1 [[C]], label %middle.block, label %vector.body |
36 | 37 |
|
37 | 38 | define void @test1(ptr %dst, {i64, i64} %sv) {
|
38 | 39 | entry:
|
@@ -66,22 +67,23 @@ declare float @powf(float, float) readnone nounwind
|
66 | 67 |
|
67 | 68 | ; FORCED-LABEL: define void @test_getVectorCallCost
|
68 | 69 |
|
69 |
| -; FORCED-LABEL: vector.body: ; preds = %vector.body, %vector.ph |
70 |
| -; FORCED-NEXT: %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
71 |
| -; FORCED-NEXT: %0 = add i32 %index, 0 |
72 |
| -; FORCED-NEXT: %1 = extractvalue { float, float } %sv, 0 |
73 |
| -; FORCED-NEXT: %broadcast.splatinsert = insertelement <2 x float> poison, float %1, i64 0 |
| 70 | +; FORCED: [[E1:%.+]] = extractvalue { float, float } %sv, 0 |
| 71 | +; FORCED-NEXT: %broadcast.splatinsert = insertelement <2 x float> poison, float [[E1]], i64 0 |
74 | 72 | ; FORCED-NEXT: %broadcast.splat = shufflevector <2 x float> %broadcast.splatinsert, <2 x float> poison, <2 x i32> zeroinitializer
|
75 |
| -; FORCED-NEXT: %2 = extractvalue { float, float } %sv, 1 |
76 |
| -; FORCED-NEXT: %broadcast.splatinsert1 = insertelement <2 x float> poison, float %2, i64 0 |
| 73 | +; FORCED-NEXT: [[E2:%.+]] = extractvalue { float, float } %sv, 1 |
| 74 | +; FORCED-NEXT: %broadcast.splatinsert1 = insertelement <2 x float> poison, float [[E2]], i64 0 |
77 | 75 | ; FORCED-NEXT: %broadcast.splat2 = shufflevector <2 x float> %broadcast.splatinsert1, <2 x float> poison, <2 x i32> zeroinitializer
|
78 |
| -; FORCED-NEXT: %3 = getelementptr float, ptr %dst, i32 %0 |
79 |
| -; FORCED-NEXT: %4 = call <2 x float> @llvm.pow.v2f32(<2 x float> %broadcast.splat, <2 x float> %broadcast.splat2) |
80 |
| -; FORCED-NEXT: %5 = getelementptr float, ptr %3, i32 0 |
81 |
| -; FORCED-NEXT: store <2 x float> %4, ptr %5, align 4 |
| 76 | + |
| 77 | +; FORCED-LABEL: vector.body: ; preds = %vector.body, %vector.ph |
| 78 | +; FORCED-NEXT: %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] |
| 79 | +; FORCED-NEXT: [[IV0:%.+]] = add i32 %index, 0 |
| 80 | +; FORCED-NEXT: [[GEP1:%.+]] = getelementptr float, ptr %dst, i32 [[IV0]] |
| 81 | +; FORCED-NEXT: [[POW:%.+]] = call <2 x float> @llvm.pow.v2f32(<2 x float> %broadcast.splat, <2 x float> %broadcast.splat2) |
| 82 | +; FORCED-NEXT: [[GEP2:%.+]] = getelementptr float, ptr [[GEP1]], i32 0 |
| 83 | +; FORCED-NEXT: store <2 x float> [[POW]], ptr [[GEP2]], align 4 |
82 | 84 | ; FORCED-NEXT: %index.next = add nuw i32 %index, 2
|
83 |
| -; FORCED-NEXT: %6 = icmp eq i32 %index.next, 1000 |
84 |
| -; FORCED-NEXT: br i1 %6, label %middle.block, label %vector.body |
| 85 | +; FORCED-NEXT: [[C:%.+]] = icmp eq i32 %index.next, 1000 |
| 86 | +; FORCED-NEXT: br i1 [[C]], label %middle.block, label %vector.body |
85 | 87 |
|
86 | 88 | define void @test_getVectorCallCost(ptr %dst, {float, float} %sv) {
|
87 | 89 | entry:
|
|
0 commit comments