[PowerPC] Materialize i64 constants using bit inversion
[oota-llvm.git] / test / CodeGen / PowerPC / constants-i64.ll
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: li [[REG1:[0-9]+]], 0
12 ; CHECK: ori [[REG2:[0-9]+]], [[REG1]], 65535
13 ; CHECK: sldi [[REG3:[0-9]+]], [[REG2]], 48
14 ; CHECK: nor 3, [[REG3]], [[REG3]]
15 ; CHECK: blr
16 }
17
18 attributes #0 = { nounwind readnone }
19
20