1 ; RUN: llc -O0 -mcpu=pwr7 -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s 2 3 define zeroext i32 @f1() { 4 entry: 5 ret i32 65535 6 } 7 ; CHECK-LABEL: @f1 8 ; CHECK: lis 3, 0 9 ; CHECK: ori 3, 3, 65535 10 11 define zeroext i32 @f2() { 12 entry: 13 ret i32 32768 14 } 15 ; CHECK-LABEL: @f2 16 ; CHECK: lis 3, 0 17 ; CHECK: ori 3, 3, 32768 18 19 define zeroext i32 @f3() { 20 entry: 21 ret i32 32767 22 } 23 ; CHECK-LABEL: @f3 24 ; CHECK: li 3, 32767 25 26 define zeroext i16 @f4() { 27 entry: 28 ret i16 65535 29 } 30 ; CHECK-LABEL: @f4 31 ; CHECK: lis 3, 0 32 ; CHECK: ori 3, 3, 65535 33 34 define zeroext i16 @f5() { 35 entry: 36 ret i16 32768 37 } 38 ; CHECK-LABEL: @f5 39 ; CHECK: lis 3, 0 40 ; CHECK: ori 3, 3, 32768 41 42 define zeroext i16 @f6() { 43 entry: 44 ret i16 32767 45 } 46 ; CHECK-LABEL: @f6 47 ; CHECK: li 3, 32767 48 49 define zeroext i16 @f7() { 50 entry: 51 ret i16 -1 52 } 53 ; CHECK-LABEL: @f7 54 ; CHECK: lis 3, 0 55 ; CHECK: ori 3, 3, 65535 56 57 define zeroext i16 @f8() { 58 entry: 59 ret i16 -32768 60 } 61 ; CHECK-LABEL: @f8 62 ; CHECK: lis 3, 0 63 ; CHECK: ori 3, 3, 32768 64 65 define signext i32 @f1s() { 66 entry: 67 ret i32 65535 68 } 69 ; CHECK-LABEL: @f1s 70 ; CHECK: lis 3, 0 71 ; CHECK: ori 3, 3, 65535 72 73 define signext i32 @f2s() { 74 entry: 75 ret i32 32768 76 } 77 ; CHECK-LABEL: @f2s 78 ; CHECK: lis 3, 0 79 ; CHECK: ori 3, 3, 32768 80 81 define signext i32 @f3s() { 82 entry: 83 ret i32 32767 84 } 85 ; CHECK-LABEL: @f3s 86 ; CHECK: li 3, 32767 87 88 define signext i16 @f4s() { 89 entry: 90 ret i16 32767 91 } 92 ; CHECK-LABEL: @f4s 93 ; CHECK: li 3, 32767 94 95 define signext i32 @f1sn() { 96 entry: 97 ret i32 -65535 98 } 99 ; CHECK-LABEL: @f1sn 100 ; CHECK: lis 3, -1 101 ; CHECK: ori 3, 3, 1 102 103 define signext i32 @f2sn() { 104 entry: 105 ret i32 -32768 106 } 107 ; CHECK-LABEL: @f2sn 108 ; CHECK: li 3, -32768 109 110 define signext i32 @f3sn() { 111 entry: 112 ret i32 -32767 113 } 114 ; CHECK-LABEL: @f3sn 115 ; CHECK: li 3, -32767 116 117 define signext i32 @f4sn() { 118 entry: 119 ret i32 -65536 120 } 121 ; CHECK-LABEL: @f4sn 122 ; CHECK: lis 3, -1 123 124 define signext i16 @f5sn() { 125 entry: 126 ret i16 -32767 127 } 128 ; CHECK-LABEL: @f5sn 129 ; CHECK: li 3, -32767 130 131 define signext i16 @f6sn() { 132 entry: 133 ret i16 -32768 134 } 135 ; CHECK-LABEL: @f6sn 136 ; CHECK: li 3, -32768 137