brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · f2cbf6e Raw
66 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2 3; Check that we can compile these functions. Don't check anything else for now.4; CHECK-LABEL: test_0:5; CHECK: tstbit6; CHECK-LABEL: test_1:7; CHECK: tstbit8; CHECK-LABEL: test_2:9; CHECK: tstbit10 11define i32 @test_0(i32 %a0, i32 %a1) #0 {12  %t0 = trunc i32 %a0 to i113  %t1 = trunc i32 %a1 to i114 15  %t2 = insertelement <2 x i1> undef, i1 %t0, i32 016  %t3 = insertelement <2 x i1> %t2, i1 %t1, i32 117 18  %t4 = shufflevector <2 x i1> %t3, <2 x i1> undef, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>19  %t5 = bitcast <8 x i1> %t4 to i820  %t6 = zext i8 %t5 to i3221  ret i32 %t622}23 24define i32 @test_1(i32 %a0, i32 %a1, i32 %a2, i32 %a3) #0 {25  %t0 = trunc i32 %a0 to i126  %t1 = trunc i32 %a1 to i127  %t2 = trunc i32 %a2 to i128  %t3 = trunc i32 %a3 to i129 30  %t4 = insertelement <4 x i1> undef, i1 %t0, i32 031  %t5 = insertelement <4 x i1> %t4, i1 %t1, i32 132  %t6 = insertelement <4 x i1> %t5, i1 %t2, i32 233  %t7 = insertelement <4 x i1> %t6, i1 %t3, i32 334 35  %t8 = shufflevector <4 x i1> %t7, <4 x i1> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>36  %t9 = bitcast <8 x i1> %t8 to i837  %ta = zext i8 %t9 to i3238  ret i32 %ta39}40 41define i32 @test_2(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %a4, i32 %a5, i32 %a6, i32 %a7) #0 {42  %t0 = trunc i32 %a0 to i143  %t1 = trunc i32 %a1 to i144  %t2 = trunc i32 %a2 to i145  %t3 = trunc i32 %a3 to i146  %t4 = trunc i32 %a4 to i147  %t5 = trunc i32 %a5 to i148  %t6 = trunc i32 %a6 to i149  %t7 = trunc i32 %a7 to i150 51  %t8 = insertelement <8 x i1> undef, i1 %t0, i32 052  %t9 = insertelement <8 x i1> %t8, i1 %t1, i32 153  %ta = insertelement <8 x i1> %t9, i1 %t2, i32 254  %tb = insertelement <8 x i1> %ta, i1 %t3, i32 355  %tc = insertelement <8 x i1> %tb, i1 %t4, i32 456  %td = insertelement <8 x i1> %tc, i1 %t5, i32 557  %te = insertelement <8 x i1> %td, i1 %t6, i32 658  %tf = insertelement <8 x i1> %te, i1 %t7, i32 759 60  %tg = bitcast <8 x i1> %tf to i861  %th = zext i8 %tg to i3262  ret i32 %th63}64 65attributes #0 = { nounwind readnone }66