|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 |
| 2 | +; RUN: opt -S --passes=slp-vectorizer -slp-threshold=-99999 < %s -mtriple=x86_64-unknown-linux-gnu -slp-revec | FileCheck %s |
| 3 | + |
| 4 | +define void @test() { |
| 5 | +; CHECK-LABEL: define void @test() { |
| 6 | +; CHECK-NEXT: [[BB:.*]]: |
| 7 | +; CHECK-NEXT: [[TRUNC:%.*]] = trunc i64 0 to i32 |
| 8 | +; CHECK-NEXT: br label %[[BB1:.*]] |
| 9 | +; CHECK: [[BB1]]: |
| 10 | +; CHECK-NEXT: [[TMP0:%.*]] = phi <2 x i32> [ zeroinitializer, %[[BB]] ], [ [[TMP4:%.*]], %[[BB1]] ] |
| 11 | +; CHECK-NEXT: [[TMP1:%.*]] = extractelement <2 x i32> [[TMP0]], i32 1 |
| 12 | +; CHECK-NEXT: [[TMP2:%.*]] = call i8 @llvm.vector.reduce.mul.v4i8(<4 x i8> zeroinitializer) |
| 13 | +; CHECK-NEXT: [[TMP3:%.*]] = zext i8 [[TMP2]] to i32 |
| 14 | +; CHECK-NEXT: [[OP_RDX:%.*]] = mul i32 [[TMP3]], [[TMP1]] |
| 15 | +; CHECK-NEXT: [[OP_RDX1:%.*]] = mul i32 [[OP_RDX]], [[TRUNC]] |
| 16 | +; CHECK-NEXT: [[TMP4]] = insertelement <2 x i32> <i32 0, i32 poison>, i32 [[OP_RDX1]], i32 1 |
| 17 | +; CHECK-NEXT: br label %[[BB1]] |
| 18 | +; |
| 19 | +bb: |
| 20 | + br label %bb1 |
| 21 | + |
| 22 | +bb1: |
| 23 | + %phi = phi i32 [ 0, %bb ], [ %mul9, %bb1 ] |
| 24 | + %phi2 = phi i32 [ 0, %bb ], [ 0, %bb1 ] |
| 25 | + %trunc = trunc i64 0 to i32 |
| 26 | + %mul = mul i32 0, %trunc |
| 27 | + %mul3 = mul i32 %trunc, %phi |
| 28 | + %mul4 = mul i32 %mul3, %mul |
| 29 | + %mul5 = mul i32 %mul4, %mul |
| 30 | + %trunc6 = trunc i64 0 to i32 |
| 31 | + %mul7 = mul i32 0, %trunc6 |
| 32 | + %mul8 = mul i32 %mul5, %mul7 |
| 33 | + %mul9 = mul i32 %mul8, %mul7 |
| 34 | + br label %bb1 |
| 35 | +} |
0 commit comments