| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 |
| ; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s |
| |
| define <4 x float> @test(i64 %0) { |
| ; CHECK-LABEL: define <4 x float> @test( |
| ; CHECK-SAME: i64 [[TMP0:%.*]]) { |
| ; CHECK-NEXT: [[ENTRY:.*:]] |
| ; CHECK-NEXT: [[TMP3:%.*]] = insertelement <4 x i64> <i64 0, i64 0, i64 poison, i64 0>, i64 [[TMP0]], i32 2 |
| ; CHECK-NEXT: [[TMP2:%.*]] = trunc <4 x i64> [[TMP3]] to <4 x i32> |
| ; CHECK-NEXT: [[TMP4:%.*]] = sitofp <4 x i64> [[TMP3]] to <4 x float> |
| ; CHECK-NEXT: [[TMP5:%.*]] = sitofp <4 x i32> [[TMP2]] to <4 x float> |
| ; CHECK-NEXT: [[TMP6:%.*]] = fadd <4 x float> [[TMP4]], [[TMP5]] |
| ; CHECK-NEXT: [[TMP7:%.*]] = fcmp ogt <4 x float> [[TMP6]], zeroinitializer |
| ; CHECK-NEXT: ret <4 x float> [[TMP6]] |
| ; |
| entry: |
| %1 = trunc i64 0 to i32 |
| %2 = sitofp i32 %1 to float |
| %3 = sitofp i64 0 to float |
| %4 = fadd float %3, %2 |
| %to_max.i = fcmp ogt float %4, 0.000000e+00 |
| %5 = trunc i64 0 to i32 |
| %6 = sitofp i32 %5 to float |
| %7 = sitofp i64 0 to float |
| %8 = fadd float %7, %6 |
| %to_max.i.1 = fcmp ogt float %8, 0.000000e+00 |
| %9 = trunc i64 %0 to i32 |
| %10 = sitofp i32 %9 to float |
| %11 = sitofp i64 %0 to float |
| %12 = fadd float %11, %10 |
| %to_max.i.2 = fcmp ogt float %12, 0.000000e+00 |
| %13 = trunc i64 0 to i32 |
| %14 = sitofp i32 %13 to float |
| %15 = sitofp i64 0 to float |
| %16 = fadd float %15, %14 |
| %to_max.i.3 = fcmp ogt float %16, 0.000000e+00 |
| %r0 = insertelement <4 x float> poison, float %4, i32 0 |
| %r1 = insertelement <4 x float> %r0, float %8, i32 1 |
| %r2 = insertelement <4 x float> %r1, float %12, i32 2 |
| %r3 = insertelement <4 x float> %r2, float %16, i32 3 |
| ret <4 x float> %r3 |
| } |