1 ; RUN: llc -mcpu=ppc64 < %s | FileCheck %s 2 target datalayout = "E-m:e-i64:64-n32:64" 3 target triple = "powerpc64-unknown-linux-gnu" 4 5 ; Function Attrs: nounwind readnone 6 define i64 @cn1() #0 { 7 entry: 8 ret i64 281474976710655 9 10 ; CHECK-LABEL: @cn1 11 ; CHECK: lis [[REG1:[0-9]+]], -1 12 ; CHECK: rldicr 3, [[REG1]], 48, 63 13 ; CHECK: blr 14 } 15 16 ; Function Attrs: nounwind readnone 17 define i64 @cnb() #0 { 18 entry: 19 ret i64 281474976710575 20 21 ; CHECK-LABEL: @cnb 22 ; CHECK: lis [[REG1:[0-9]+]], -81 23 ; CHECK: rldicr 3, [[REG1]], 48, 63 24 ; CHECK: blr 25 } 26 27 ; Function Attrs: nounwind readnone 28 define i64 @f2(i64 %x) #0 { 29 entry: 30 ret i64 -68719476736 31 32 ; CHECK-LABEL: @f2 33 ; CHECK: li [[REG1:[0-9]+]], -1 34 ; CHECK: sldi 3, [[REG1]], 36 35 ; CHECK: blr 36 } 37 38 ; Function Attrs: nounwind readnone 39 define i64 @f2a(i64 %x) #0 { 40 entry: 41 ret i64 -361850994688 42 43 ; CHECK-LABEL: @f2a 44 ; CHECK: li [[REG1:[0-9]+]], -337 45 ; CHECK: sldi 3, [[REG1]], 30 46 ; CHECK: blr 47 } 48 49 ; Function Attrs: nounwind readnone 50 define i64 @f2n(i64 %x) #0 { 51 entry: 52 ret i64 68719476735 53 54 ; CHECK-LABEL: @f2n 55 ; CHECK: lis [[REG1:[0-9]+]], -4096 56 ; CHECK: rldicr 3, [[REG1]], 36, 63 57 ; CHECK: blr 58 } 59 60 ; Function Attrs: nounwind readnone 61 define i64 @f3(i64 %x) #0 { 62 entry: 63 ret i64 8589934591 64 65 ; CHECK-LABEL: @f3 66 ; CHECK: lis [[REG1:[0-9]+]], -32768 67 ; CHECK: rldicr 3, [[REG1]], 33, 63 68 ; CHECK: blr 69 } 70 71 ; Function Attrs: nounwind readnone 72 define i64 @cn2n() #0 { 73 entry: 74 ret i64 -1407374887747585 75 76 ; CHECK-LABEL: @cn2n 77 ; CHECK: lis [[REG1:[0-9]+]], -5121 78 ; CHECK: ori [[REG2:[0-9]+]], [[REG1]], 65534 79 ; CHECK: rldicr 3, [[REG2]], 22, 63 80 ; CHECK: blr 81 } 82 83 attributes #0 = { nounwind readnone } 84 85