1 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s
4 ; Make sure that the subfic is generated iff possible
6 define i64 @subtract_from_imm1(i64 %v) nounwind readnone {
8 ; CHECK-LABEL: subtract_from_imm1
9 ; CHECK: subfic 3, 3, 32767
11 %sub = sub i64 32767, %v
15 define i64 @subtract_from_imm2(i64 %v) nounwind readnone {
17 ; CHECK-LABEL: subtract_from_imm2
20 %sub = sub i64 32768, %v
24 define i64 @subtract_from_imm3(i64 %v) nounwind readnone {
26 ; CHECK-LABEL: subtract_from_imm3
27 ; CHECK: subfic 3, 3, -32768
29 %sub = sub i64 -32768, %v
33 define i64 @subtract_from_imm4(i64 %v) nounwind readnone {
35 ; CHECK-LABEL: subtract_from_imm4
38 %sub = sub i64 -32769, %v