163 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s3 4define i16 @test() {5; CHECK-LABEL: define i16 @test() {6; CHECK-NEXT: [[ENTRY:.*:]]7; CHECK-NEXT: [[TMP0:%.*]] = lshr i32 0, 08; CHECK-NEXT: [[TMP1:%.*]] = shl i32 [[TMP0]], 09; CHECK-NEXT: [[CALL99_I:%.*]] = call i32 @llvm.bswap.i32(i32 0)10; CHECK-NEXT: [[TMP2:%.*]] = lshr i32 [[CALL99_I]], 011; CHECK-NEXT: [[CALL7_I45:%.*]] = tail call i32 null(i32 0)12; CHECK-NEXT: [[TMP8:%.*]] = lshr i32 [[CALL7_I45]], 013; CHECK-NEXT: [[TMP4:%.*]] = insertelement <28 x i32> <i32 -1, i32 -1, i32 -1, i32 -1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 poison>, i32 [[TMP1]], i32 414; CHECK-NEXT: [[TMP5:%.*]] = insertelement <28 x i32> [[TMP4]], i32 [[TMP2]], i32 515; CHECK-NEXT: [[TMP6:%.*]] = shufflevector <28 x i32> [[TMP5]], <28 x i32> <i32 0, i32 0, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>, <28 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 28, i32 29, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 poison>16; CHECK-NEXT: [[TMP7:%.*]] = insertelement <28 x i32> [[TMP6]], i32 [[TMP8]], i32 1217; CHECK-NEXT: [[TMP16:%.*]] = shufflevector <28 x i32> [[TMP7]], <28 x i32> <i32 0, i32 0, i32 0, i32 0, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>, <28 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 poison, i32 poison, i32 poison, i32 poison, i32 12, i32 28, i32 29, i32 30, i32 31, i32 poison, i32 poison, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 poison>18; CHECK-NEXT: [[TMP9:%.*]] = shufflevector <28 x i32> [[TMP16]], <28 x i32> <i32 0, i32 0, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>, <28 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 28, i32 29, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27>19; CHECK-NEXT: [[TMP10:%.*]] = shufflevector <28 x i32> [[TMP9]], <28 x i32> <i32 0, i32 0, i32 0, i32 0, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>, <28 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 28, i32 29, i32 30, i32 31, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27>20; CHECK-NEXT: [[TMP11:%.*]] = and <28 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 poison>, [[TMP10]]21; CHECK-NEXT: [[TMP12:%.*]] = shufflevector <28 x i32> [[TMP11]], <28 x i32> poison, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 6, i32 7, i32 7, i32 8, i32 9, i32 10, i32 10, i32 11, i32 12, i32 13, i32 13, i32 14, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26>22; CHECK-NEXT: [[TMP13:%.*]] = icmp ne <32 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1>, [[TMP12]]23; CHECK-NEXT: [[TMP14:%.*]] = bitcast <32 x i1> [[TMP13]] to i3224; CHECK-NEXT: [[TMP15:%.*]] = call i32 @llvm.ctpop.i32(i32 [[TMP14]])25; CHECK-NEXT: [[OP_RDX4:%.*]] = trunc i32 [[TMP15]] to i1626; CHECK-NEXT: ret i16 [[OP_RDX4]]27;28entry:29 %.not243.i = icmp ne i32 0, 030 %add51.i = zext i1 %.not243.i to i1631 %.not244.i = icmp ne i32 0, 032 %add58.i = zext i1 %.not244.i to i1633 %add59.i = add i16 %add51.i, %add58.i34 %.not247.i = icmp ne i32 0, 035 %add74.i = zext i1 %.not247.i to i1636 %add75.i = add i16 %add59.i, %add74.i37 %.not248.i = icmp ne i32 0, 038 %add81.i = zext i1 %.not248.i to i1639 %add82.i = add i16 %add75.i, %add81.i40 %0 = lshr i32 0, 041 %1 = shl i32 %0, 042 %unsclear94.i = and i32 %1, 043 %.not251.i = icmp ne i32 %unsclear94.i, 044 %add97.i = zext i1 %.not251.i to i1645 %add98.i = add i16 %add82.i, %add97.i46 %call99.i = call i32 @llvm.bswap.i32(i32 0)47 %2 = lshr i32 %call99.i, 048 %3 = and i32 %2, 049 %.not252.i = icmp ne i32 %3, 050 %add104.i = zext i1 %.not252.i to i1651 %add105.i = add i16 %add98.i, %add104.i52 %4 = shl i32 0, 053 %unsclear117.i = and i32 %4, 054 %.not255.i = icmp ne i32 %unsclear117.i, 055 %add120.i = zext i1 %.not255.i to i1656 %add121.i = add i16 %add105.i, %add120.i57 %.not256.i = icmp ne i32 0, %unsclear117.i58 %add127.i = zext i1 %.not256.i to i1659 %add128.i = add i16 %add121.i, %add127.i60 %5 = shl i32 0, 061 %unsclear140.i = and i32 %5, 062 %.not259.i = icmp ne i32 %unsclear140.i, 063 %add143.i = zext i1 %.not259.i to i1664 %add144.i = add i16 %add128.i, %add143.i65 %.not260.i = icmp ne i32 0, %unsclear140.i66 %add150.i = zext i1 %.not260.i to i1667 %add151.i = add i16 %add144.i, %add150.i68 %6 = shl i32 0, 069 %unsclear163.i = and i32 %6, 070 %.not263.i = icmp ne i32 %unsclear163.i, 071 %add166.i = zext i1 %.not263.i to i1672 %add167.i = add i16 %add151.i, %add166.i73 %unsclear169.i = shl i32 0, 074 %unsclear170.i = and i32 %unsclear169.i, 075 %.not264.i = icmp ne i32 %unsclear170.i, 076 %add173.i = zext i1 %.not264.i to i1677 %add174.i = add i16 %add167.i, %add173.i78 %7 = shl i32 0, 079 %unsclear186.i = and i32 %7, 080 %.not267.i = icmp ne i32 %unsclear186.i, 081 %add189.i = zext i1 %.not267.i to i1682 %add190.i = add i16 %add174.i, %add189.i83 %.not268.i = icmp ne i32 0, %unsclear186.i84 %add196.i = zext i1 %.not268.i to i1685 %add197.i = add i16 %add190.i, %add196.i86 %8 = shl i32 0, 087 %unsclear4.i42 = and i32 %8, 088 %.not.i43 = icmp ne i32 %unsclear4.i42, 089 %add.i = zext i1 %.not.i43 to i1690 %add6.i44 = add i16 %add197.i, %add.i91 %call7.i45 = tail call i32 null(i32 0)92 %9 = lshr i32 %call7.i45, 093 %10 = and i32 %9, 094 %.not209.i = icmp ne i32 %10, 095 %add12.i46 = zext i1 %.not209.i to i1696 %add13.i47 = add i16 %add6.i44, %add12.i4697 %11 = lshr i32 0, 098 %12 = shl i32 %11, 099 %unsclear25.i51 = and i32 %12, 0100 %.not212.i = icmp ne i32 %unsclear25.i51, 0101 %add28.i52 = zext i1 %.not212.i to i16102 %add29.i53 = add i16 %add13.i47, %add28.i52103 %.not213.i = icmp ne i32 0, %unsclear25.i51104 %add35.i55 = zext i1 %.not213.i to i16105 %add36.i56 = add i16 %add29.i53, %add35.i55106 %13 = shl i32 0, 0107 %unsclear48.i60 = and i32 %13, 0108 %.not216.i = icmp ne i32 %unsclear48.i60, 0109 %add51.i61 = zext i1 %.not216.i to i16110 %add52.i62 = add i16 %add36.i56, %add51.i61111 %.not217.i = icmp ne i32 0, %unsclear48.i60112 %add58.i64 = zext i1 %.not217.i to i16113 %add59.i65 = add i16 %add52.i62, %add58.i64114 %14 = shl i32 0, 0115 %unsclear71.i69 = and i32 %14, 0116 %.not220.i = icmp ne i32 %unsclear71.i69, 0117 %add74.i70 = zext i1 %.not220.i to i16118 %add75.i71 = add i16 %add59.i65, %add74.i70119 %15 = shl i32 0, 0120 %unsclear78.i = and i32 %15, 0121 %.not221.i = icmp ne i32 %unsclear78.i, 0122 %add81.i73 = zext i1 %.not221.i to i16123 %add82.i74 = add i16 %add75.i71, %add81.i73124 %16 = shl i32 0, 0125 %unsclear94.i78 = and i32 %16, 0126 %.not224.i = icmp ne i32 %unsclear94.i78, 0127 %add97.i79 = zext i1 %.not224.i to i16128 %add98.i80 = add i16 %add82.i74, %add97.i79129 %17 = shl i32 0, 0130 %unsclear101.i = and i32 %17, 0131 %.not225.i = icmp ne i32 %unsclear101.i, 0132 %add104.i82 = zext i1 %.not225.i to i16133 %add105.i83 = add i16 %add98.i80, %add104.i82134 %.not229.i = icmp ne i32 0, 0135 %add127.i91 = zext i1 %.not229.i to i16136 %add128.i92 = add i16 %add105.i83, %add127.i91137 %.not232.i = icmp ne i32 0, 0138 %add143.i97 = zext i1 %.not232.i to i16139 %add144.i98 = add i16 %add128.i92, %add143.i97140 %.not233.i = icmp ne i32 0, 0141 %add150.i100 = zext i1 %.not233.i to i16142 %add151.i101 = add i16 %add144.i98, %add150.i100143 %.not236.i106 = icmp ne i32 0, 0144 %add166.i107 = zext i1 %.not236.i106 to i16145 %add167.i108 = add i16 %add151.i101, %add166.i107146 %.not237.i = icmp ne i32 0, 0147 %add173.i110 = zext i1 %.not237.i to i16148 %add174.i111 = add i16 %add167.i108, %add173.i110149 %.not.i118 = icmp ne i32 0, 0150 %add.i119 = zext i1 %.not.i118 to i16151 %add6.i120 = add i16 %add174.i111, %add.i119152 %.not209.i122 = icmp ne i32 0, 0153 %add12.i123 = zext i1 %.not209.i122 to i16154 %add13.i124 = add i16 %add6.i120, %add12.i123155 %.not212.i131 = icmp ne i32 1, 0156 %add28.i132 = zext i1 %.not212.i131 to i16157 %add29.i133 = add i16 %add13.i124, %add28.i132158 ret i16 %add29.i133159}160 161declare i32 @llvm.bswap.i32(i32)162 163