• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
2
3; 4278190095 = 0xff00000f
4define i32 @f1(i32 %a) {
5; CHECK: f1:
6; CHECK: bfc r
7    %tmp = and i32 %a, 4278190095
8    ret i32 %tmp
9}
10
11; 4286578688 = 0xff800000
12define i32 @f2(i32 %a) {
13; CHECK: f2:
14; CHECK: bfc r
15    %tmp = and i32 %a, 4286578688
16    ret i32 %tmp
17}
18
19; 4095 = 0x00000fff
20define i32 @f3(i32 %a) {
21; CHECK: f3:
22; CHECK: bfc r
23    %tmp = and i32 %a, 4095
24    ret i32 %tmp
25}
26
27; 2147483646 = 0x7ffffffe   not implementable w/ BFC
28define i32 @f4(i32 %a) {
29; CHECK: f4:
30    %tmp = and i32 %a, 2147483646
31    ret i32 %tmp
32}
33