1 ; RUN: llc -simplify-mir -verify-machineinstrs -stop-after=finalize-isel \
2 ; RUN: -mtriple=powerpc64le-unknown-unknown -mattr=-vsx < %s | FileCheck %s
3 ; RUN: llc -simplify-mir -verify-machineinstrs -stop-after=finalize-isel \
4 ; RUN: -mtriple=powerpc-unknown-unknown -mcpu=pwr6 -mattr=-vsx < %s | \
5 ; RUN: FileCheck --check-prefix=CHECK-P6 %s
6 ; RUN: llc -simplify-mir -verify-machineinstrs -stop-after=finalize-isel \
7 ; RUN: -mtriple=powerpc64-unknown-unknown -mcpu=pwr6 -mattr=-vsx < %s | \
8 ; RUN: FileCheck --check-prefix=CHECK-P6-64 %s
10 define float @test(float %a) {
12 ; CHECK-NEXT: - { id: 0, size: 4, alignment: 4 }
13 ; CHECK: %2:f8rc = nofpexcept FCTIWZ killed %1, implicit $rm
14 ; CHECK: STFIWX killed %2, $zero8, %3
15 ; CHECK-NEXT: %4:f8rc = LFIWAX $zero8, %3 :: (load (s32) from %stack.0)
16 ; CHECK-NEXT: %5:f4rc = nofpexcept FCFIDS killed %4, implicit $rm
17 ; CHECK-NEXT: $f1 = COPY %5
18 ; CHECK-NEXT: BLR8 implicit $lr8, implicit $rm, implicit $f1
21 ; CHECK-P6-NEXT: - { id: 0, size: 4, alignment: 4 }
22 ; CHECK-P6: %2:f8rc = nofpexcept FCTIWZ killed %1, implicit $rm
23 ; CHECK-P6: STFIWX killed %2, $zero, %3
24 ; CHECK-P6-NEXT: %4:f8rc = LFIWAX $zero, %3 :: (load (s32) from %stack.0)
25 ; CHECK-P6-NEXT: %5:f8rc = nofpexcept FCFID killed %4, implicit $rm
26 ; CHECK-P6-NEXT: %6:f4rc = nofpexcept FRSP killed %5, implicit $rm
27 ; CHECK-P6-NEXT: $f1 = COPY %6
28 ; CHECK-P6-NEXT: BLR implicit $lr, implicit $rm, implicit $f1
31 ; CHECK-P6-64-NEXT: - { id: 0, size: 4, alignment: 4 }
32 ; CHECK-P6-64: %2:f8rc = nofpexcept FCTIWZ killed %1, implicit $rm
33 ; CHECK-P6-64: STFIWX killed %2, $zero8, %3
34 ; CHECK-P6-64-NEXT: %4:f8rc = LFIWAX $zero8, %3 :: (load (s32) from %stack.0)
35 ; CHECK-P6-64-NEXT: %5:f8rc = nofpexcept FCFID killed %4, implicit $rm
36 ; CHECK-P6-64-NEXT: %6:f4rc = nofpexcept FRSP killed %5, implicit $rm
37 ; CHECK-P6-64-NEXT: $f1 = COPY %6
38 ; CHECK-P6-64-NEXT: BLR8 implicit $lr8, implicit $rm, implicit $f1
41 %b = fptosi float %a to i32
42 %c = sitofp i32 %b to float