1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
3 ; RUN: -mcpu=pwr7 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
4 ; RUN: FileCheck %s --check-prefix=CHECK-BE
5 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
6 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
7 ; RUN: FileCheck %s --check-prefix=CHECK-P9-BE
8 define void @test() local_unnamed_addr #0 align 2 {
9 ; CHECK-BE-LABEL: test:
10 ; CHECK-BE: # %bb.0: # %bb
11 ; CHECK-BE-NEXT: lhz r3, 0(r3)
12 ; CHECK-BE-NEXT: vspltisw v2, -16
13 ; CHECK-BE-NEXT: addi r3, r3, 1
14 ; CHECK-BE-NEXT: xxlxor vs1, vs1, vs1
15 ; CHECK-BE-NEXT: vsrw v2, v2, v2
16 ; CHECK-BE-NEXT: sth r3, -32(r1)
17 ; CHECK-BE-NEXT: addi r3, r1, -32
18 ; CHECK-BE-NEXT: lxvw4x vs0, 0, r3
19 ; CHECK-BE-NEXT: addi r3, r1, -16
20 ; CHECK-BE-NEXT: xxsel vs0, vs0, vs1, v2
21 ; CHECK-BE-NEXT: stxvw4x vs0, 0, r3
22 ; CHECK-BE-NEXT: lwz r3, -16(r1)
23 ; CHECK-BE-NEXT: stw r3, 0(r3)
24 ; CHECK-BE-NEXT: .p2align 4
25 ; CHECK-BE-NEXT: .LBB0_1: # %bb9
27 ; CHECK-BE-NEXT: b .LBB0_1
29 ; CHECK-P9-BE-LABEL: test:
30 ; CHECK-P9-BE: # %bb.0: # %bb
31 ; CHECK-P9-BE-NEXT: lhz r3, 0(r3)
32 ; CHECK-P9-BE-NEXT: vspltisw v2, -16
33 ; CHECK-P9-BE-NEXT: xxlxor vs0, vs0, vs0
34 ; CHECK-P9-BE-NEXT: addi r3, r3, 1
35 ; CHECK-P9-BE-NEXT: vsrw v2, v2, v2
36 ; CHECK-P9-BE-NEXT: sldi r3, r3, 48
37 ; CHECK-P9-BE-NEXT: mtfprd f1, r3
38 ; CHECK-P9-BE-NEXT: xxsel v2, vs1, vs0, v2
39 ; CHECK-P9-BE-NEXT: xxsldwi vs0, v2, v2, 3
40 ; CHECK-P9-BE-NEXT: stfiwx f0, 0, r3
41 ; CHECK-P9-BE-NEXT: .p2align 4
42 ; CHECK-P9-BE-NEXT: .LBB0_1: # %bb9
44 ; CHECK-P9-BE-NEXT: b .LBB0_1
46 br i1 false, label %bb1, label %bb2
52 %i = load i32, ptr poison, align 4
53 %i3 = trunc i32 %i to i16
55 %i5 = bitcast i16 %i4 to <2 x i8>
56 %i6 = shufflevector <2 x i8> %i5, <2 x i8> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
57 %i7 = select <4 x i1> <i1 true, i1 true, i1 false, i1 false>, <4 x i8> %i6, <4 x i8> undef
58 %i8 = select <4 x i1> <i1 false, i1 false, i1 true, i1 true>, <4 x i8> <i8 undef, i8 undef, i8 0, i8 0>, <4 x i8> %i7
61 bb9: ; preds = %bb9, %bb2
62 %i10 = phi <4 x i8> [ %i8, %bb2 ], [ poison, %bb9 ]
63 %i11 = bitcast <4 x i8> %i10 to i32
64 store i32 %i11, ptr poison, align 2