|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6 |
| 2 | +; RUN: opt -passes=slp-vectorizer -S --mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s |
| 3 | + |
| 4 | +@a = common global [100 x i64] zeroinitializer, align 64 |
| 5 | + |
| 6 | +define void @test() { |
| 7 | +; CHECK-LABEL: define void @test() { |
| 8 | +; CHECK-NEXT: [[ENTRY:.*]]: |
| 9 | +; CHECK-NEXT: [[TMP0:%.*]] = load <2 x i64>, ptr getelementptr inbounds nuw (i8, ptr @a, i64 48), align 8 |
| 10 | +; CHECK-NEXT: [[TMP1:%.*]] = add <2 x i64> [[TMP0]], splat (i64 1) |
| 11 | +; CHECK-NEXT: [[TMP2:%.*]] = shufflevector <2 x i64> [[TMP0]], <2 x i64> [[TMP1]], <2 x i32> <i32 0, i32 3> |
| 12 | +; CHECK-NEXT: [[TMP3:%.*]] = add <2 x i64> [[TMP2]], splat (i64 1) |
| 13 | +; CHECK-NEXT: br i1 false, label %[[LOP_RHSCNT_I_PEEL:.*]], label %[[LAND_END_I_PEEL:.*]] |
| 14 | +; CHECK: [[LOP_RHSCNT_I_PEEL]]: |
| 15 | +; CHECK-NEXT: [[TMP4:%.*]] = or <2 x i64> [[TMP1]], <i64 1, i64 0> |
| 16 | +; CHECK-NEXT: br label %[[LAND_END_I_PEEL]] |
| 17 | +; CHECK: [[LAND_END_I_PEEL]]: |
| 18 | +; CHECK-NEXT: [[TMP5:%.*]] = phi <2 x i64> [ [[TMP3]], %[[ENTRY]] ], [ [[TMP4]], %[[LOP_RHSCNT_I_PEEL]] ] |
| 19 | +; CHECK-NEXT: store <2 x i64> [[TMP5]], ptr getelementptr inbounds nuw (i8, ptr @a, i64 48), align 8 |
| 20 | +; CHECK-NEXT: ret void |
| 21 | +; |
| 22 | +entry: |
| 23 | + %.promoted104.i = load i64, ptr getelementptr inbounds nuw (i8, ptr @a, i64 56), align 8 |
| 24 | + %.promoted103.i = load i64, ptr getelementptr inbounds nuw (i8, ptr @a, i64 48), align 8 |
| 25 | + %0 = add i64 %.promoted104.i, 1 |
| 26 | + %1 = add i64 %.promoted103.i, 1 |
| 27 | + %2 = add i64 %0, 1 |
| 28 | + br i1 false, label %lop.rhscnt.i.peel, label %land.end.i.peel |
| 29 | + |
| 30 | +lop.rhscnt.i.peel: |
| 31 | + %3 = or i64 %1, 1 |
| 32 | + br label %land.end.i.peel |
| 33 | + |
| 34 | +land.end.i.peel: |
| 35 | + %4 = phi i64 [ %2, %entry ], [ %0, %lop.rhscnt.i.peel ] |
| 36 | + %5 = phi i64 [ %1, %entry ], [ %3, %lop.rhscnt.i.peel ] |
| 37 | + store i64 %5, ptr getelementptr inbounds nuw (i8, ptr @a, i64 48), align 8 |
| 38 | + store i64 %4, ptr getelementptr inbounds nuw (i8, ptr @a, i64 56), align 8 |
| 39 | + ret void |
| 40 | +} |
0 commit comments