brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.5 KiB · a3a4ab9 Raw
93 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -passes=slp-vectorizer -S -mtriple=amdgcn-amd-amdhsa -mcpu=gfx906 < %s | FileCheck %s3 4define <4 x half> @phis(i1 %cmp1, <4 x half> %in1, <4 x half> %in2)  {5; CHECK-LABEL: @phis(6; CHECK-NEXT:  entry:7; CHECK-NEXT:    [[TMP0:%.*]] = shufflevector <4 x half> [[IN1:%.*]], <4 x half> poison, <2 x i32> <i32 0, i32 1>8; CHECK-NEXT:    [[TMP1:%.*]] = shufflevector <4 x half> [[IN1]], <4 x half> poison, <2 x i32> <i32 2, i32 3>9; CHECK-NEXT:    br i1 [[CMP1:%.*]], label [[BB1:%.*]], label [[BB0:%.*]]10; CHECK:       bb0:11; CHECK-NEXT:    [[TMP2:%.*]] = shufflevector <4 x half> [[IN2:%.*]], <4 x half> poison, <2 x i32> <i32 0, i32 1>12; CHECK-NEXT:    [[TMP3:%.*]] = shufflevector <4 x half> [[IN2]], <4 x half> poison, <2 x i32> <i32 2, i32 3>13; CHECK-NEXT:    br label [[BB1]]14; CHECK:       bb1:15; CHECK-NEXT:    [[TMP4:%.*]] = phi <2 x half> [ [[TMP0]], [[ENTRY:%.*]] ], [ [[TMP2]], [[BB0]] ]16; CHECK-NEXT:    [[TMP5:%.*]] = phi <2 x half> [ [[TMP1]], [[ENTRY]] ], [ [[TMP3]], [[BB0]] ]17; CHECK-NEXT:    [[TMP6:%.*]] = shufflevector <2 x half> [[TMP4]], <2 x half> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>18; CHECK-NEXT:    [[TMP7:%.*]] = shufflevector <2 x half> [[TMP5]], <2 x half> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>19; CHECK-NEXT:    [[TMP8:%.*]] = shufflevector <2 x half> [[TMP4]], <2 x half> [[TMP5]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>20; CHECK-NEXT:    ret <4 x half> [[TMP8]]21;22entry:23  %a0 = extractelement <4 x half> %in1, i64 024  %a1 = extractelement <4 x half> %in1, i64 125  %a2 = extractelement <4 x half> %in1, i64 226  %a3 = extractelement <4 x half> %in1, i64 327  br i1 %cmp1, label %bb1, label %bb028 29bb0:30  %b0 = extractelement <4 x half> %in2, i64 031  %b1 = extractelement <4 x half> %in2, i64 132  %b2 = extractelement <4 x half> %in2, i64 233  %b3 = extractelement <4 x half> %in2, i64 334  br label %bb135 36bb1:37  %c0 = phi half [ %a0, %entry ], [ %b0, %bb0 ]38  %c1 = phi half [ %a1, %entry ], [ %b1, %bb0 ]39  %c2 = phi half [ %a2, %entry ], [ %b2, %bb0 ]40  %c3 = phi half [ %a3, %entry ], [ %b3, %bb0 ]41 42  %o0 = insertelement <4 x half> undef, half %c0, i64 043  %o1 = insertelement <4 x half> %o0, half %c1, i64 144  %o2 = insertelement <4 x half> %o1, half %c2, i64 245  %o3 = insertelement <4 x half> %o2, half %c3, i64 346  ret <4 x half> %o347}48 49define <4 x half> @phis_reverse(i1 %cmp1, <4 x half> %in1, <4 x half> %in2)  {50; CHECK-LABEL: @phis_reverse(51; CHECK-NEXT:  entry:52; CHECK-NEXT:    [[TMP1:%.*]] = shufflevector <4 x half> [[IN1:%.*]], <4 x half> poison, <2 x i32> <i32 0, i32 1>53; CHECK-NEXT:    [[TMP2:%.*]] = shufflevector <4 x half> [[IN1]], <4 x half> poison, <2 x i32> <i32 2, i32 3>54; CHECK-NEXT:    br i1 [[CMP1:%.*]], label [[BB1:%.*]], label [[BB0:%.*]]55; CHECK:       bb0:56; CHECK-NEXT:    [[TMP3:%.*]] = shufflevector <4 x half> [[IN2:%.*]], <4 x half> poison, <2 x i32> <i32 0, i32 1>57; CHECK-NEXT:    [[TMP9:%.*]] = shufflevector <4 x half> [[IN2]], <4 x half> poison, <2 x i32> <i32 2, i32 3>58; CHECK-NEXT:    br label [[BB1]]59; CHECK:       bb1:60; CHECK-NEXT:    [[TMP5:%.*]] = phi <2 x half> [ [[TMP1]], [[ENTRY:%.*]] ], [ [[TMP3]], [[BB0]] ]61; CHECK-NEXT:    [[TMP4:%.*]] = phi <2 x half> [ [[TMP2]], [[ENTRY]] ], [ [[TMP9]], [[BB0]] ]62; CHECK-NEXT:    [[TMP6:%.*]] = shufflevector <2 x half> [[TMP5]], <2 x half> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>63; CHECK-NEXT:    [[TMP7:%.*]] = shufflevector <2 x half> [[TMP4]], <2 x half> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>64; CHECK-NEXT:    [[TMP8:%.*]] = shufflevector <2 x half> [[TMP5]], <2 x half> [[TMP4]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>65; CHECK-NEXT:    ret <4 x half> [[TMP8]]66;67entry:68  %a0 = extractelement <4 x half> %in1, i64 069  %a1 = extractelement <4 x half> %in1, i64 170  %a2 = extractelement <4 x half> %in1, i64 271  %a3 = extractelement <4 x half> %in1, i64 372  br i1 %cmp1, label %bb1, label %bb073 74bb0:75  %b0 = extractelement <4 x half> %in2, i64 076  %b1 = extractelement <4 x half> %in2, i64 177  %b2 = extractelement <4 x half> %in2, i64 278  %b3 = extractelement <4 x half> %in2, i64 379  br label %bb180 81bb1:82  %c3 = phi half [ %a3, %entry ], [ %b3, %bb0 ]83  %c2 = phi half [ %a2, %entry ], [ %b2, %bb0 ]84  %c1 = phi half [ %a1, %entry ], [ %b1, %bb0 ]85  %c0 = phi half [ %a0, %entry ], [ %b0, %bb0 ]86 87  %o0 = insertelement <4 x half> undef, half %c0, i64 088  %o1 = insertelement <4 x half> %o0, half %c1, i64 189  %o2 = insertelement <4 x half> %o1, half %c2, i64 290  %o3 = insertelement <4 x half> %o2, half %c3, i64 391  ret <4 x half> %o392}93