• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; All of these should be codegen'd without loading immediates
2; RUN: llc < %s -march=ppc32 -o %t
3; RUN: grep subfc %t | count 1
4; RUN: grep subfe %t | count 1
5; RUN: grep subfze %t | count 1
6; RUN: grep subfme %t | count 1
7; RUN: grep subfic %t | count 2
8
9define i64 @sub_ll(i64 %a, i64 %b) {
10entry:
11	%tmp.2 = sub i64 %a, %b		; <i64> [#uses=1]
12	ret i64 %tmp.2
13}
14
15define i64 @sub_l_5(i64 %a) {
16entry:
17	%tmp.1 = sub i64 5, %a		; <i64> [#uses=1]
18	ret i64 %tmp.1
19}
20
21define i64 @sub_l_m5(i64 %a) {
22entry:
23	%tmp.1 = sub i64 -5, %a		; <i64> [#uses=1]
24	ret i64 %tmp.1
25}
26