1 ; Make sure this testcase is supported by all code generators. Either the
2 ; intrinsic is supported natively or IntrinsicLowering provides it.
3 ; RUN: llvm-as < %s > %t.bc
4 ; RUN: lli --force-interpreter=true %t.bc
6 declare i32 @llvm.part.set.i32.i32(i32 %x, i32 %rep, i32 %hi, i32 %lo)
7 declare i16 @llvm.part.set.i16.i16(i16 %x, i16 %rep, i32 %hi, i32 %lo)
8 define i32 @test_part_set(i32 %A, i16 %B) {
9 %a = call i32 @llvm.part.set.i32.i32(i32 %A, i32 27, i32 8, i32 0)
10 %b = call i16 @llvm.part.set.i16.i16(i16 %B, i16 27, i32 8, i32 0)
11 %c = zext i16 %b to i32
16 declare i32 @llvm.part.select.i32(i32 %x, i32 %hi, i32 %lo)
17 declare i16 @llvm.part.select.i16(i16 %x, i32 %hi, i32 %lo)
18 define i32 @test_part_select(i32 %A, i16 %B) {
19 %a = call i32 @llvm.part.select.i32(i32 %A, i32 8, i32 0)
20 %b = call i16 @llvm.part.select.i16(i16 %B, i32 8, i32 0)
21 %c = zext i16 %b to i32
26 define i32 @main(i32 %argc, i8** %argv) {
27 %a = call i32 @test_part_set(i32 23, i16 57)
28 %b = call i32 @test_part_select(i32 23, i16 57)