1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=ppc32-- | FileCheck %s \
3 ; RUN: -check-prefix=PPC32
4 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64 | FileCheck %s \
5 ; RUN: -check-prefix=PPC64
6 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le -mattr=-direct-move \
7 ; RUN: | FileCheck %s -check-prefix=PPC64LE
8 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le | FileCheck %s \
9 ; RUN: -check-prefix=DM
13 ; PPC32: # %bb.0: # %entry
14 ; PPC32-NEXT: stwu 1, -32(1)
15 ; PPC32-NEXT: .cfi_def_cfa_offset 32
17 ; PPC32-NEXT: stfd 0, 16(1)
18 ; PPC32-NEXT: lwz 3, 20(1)
19 ; PPC32-NEXT: clrlwi 4, 3, 30
20 ; PPC32-NEXT: not 3, 3
21 ; PPC32-NEXT: rlwinm 3, 3, 31, 31, 31
22 ; PPC32-NEXT: xor 3, 4, 3
23 ; PPC32-NEXT: stw 3, 24(1)
24 ; PPC32-NEXT: stw 3, 28(1)
25 ; PPC32-NEXT: addi 1, 1, 32
29 ; PPC64: # %bb.0: # %entry
31 ; PPC64-NEXT: stfd 0, -16(1)
32 ; PPC64-NEXT: lwz 3, -12(1)
33 ; PPC64-NEXT: clrlwi 4, 3, 30
34 ; PPC64-NEXT: not 3, 3
35 ; PPC64-NEXT: rlwinm 3, 3, 31, 31, 31
36 ; PPC64-NEXT: xor 3, 4, 3
37 ; PPC64-NEXT: stw 3, -8(1)
38 ; PPC64-NEXT: stw 3, -4(1)
42 ; PPC64LE: # %bb.0: # %entry
43 ; PPC64LE-NEXT: mffs 0
44 ; PPC64LE-NEXT: stfd 0, -16(1)
45 ; PPC64LE-NEXT: lwz 3, -16(1)
46 ; PPC64LE-NEXT: clrlwi 4, 3, 30
47 ; PPC64LE-NEXT: not 3, 3
48 ; PPC64LE-NEXT: rlwinm 3, 3, 31, 31, 31
49 ; PPC64LE-NEXT: xor 3, 4, 3
50 ; PPC64LE-NEXT: stw 3, -8(1)
51 ; PPC64LE-NEXT: stw 3, -4(1)
55 ; DM: # %bb.0: # %entry
57 ; DM-NEXT: mffprd 3, 0
58 ; DM-NEXT: clrlwi 4, 3, 30
60 ; DM-NEXT: rlwinm 3, 3, 31, 31, 31
61 ; DM-NEXT: xor 3, 4, 3
62 ; DM-NEXT: stw 3, -8(1)
63 ; DM-NEXT: stw 3, -4(1)
66 %retval = alloca i32 ; <ptr> [#uses=2]
67 %tmp = alloca i32 ; <ptr> [#uses=2]
68 %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
69 %tmp1 = call i32 @llvm.get.rounding( ) ; <i32> [#uses=1]
70 store i32 %tmp1, ptr %tmp, align 4
71 %tmp2 = load i32, ptr %tmp, align 4 ; <i32> [#uses=1]
72 store i32 %tmp2, ptr %retval, align 4
75 return: ; preds = %entry
76 %retval3 = load i32, ptr %retval ; <i32> [#uses=1]
80 declare i32 @llvm.get.rounding() nounwind