blob: 9e94efe3f9dbbc12d95a4bcc8354146c4068a9e7 [file] [log] [blame]
Dan Gohmanfce288f2009-09-09 00:09:15 +00001; RUN: llc < %s -march=arm > %t
Dan Gohman28beeea2007-08-15 13:36:28 +00002; RUN: grep and %t | count 1
3; RUN: grep orr %t | count 1
4; RUN: grep eor %t | count 1
5; RUN: grep mov.*lsl %t | count 1
6; RUN: grep mov.*asr %t | count 1
Rafael Espindola0a200602006-09-08 17:36:23 +00007
Reid Spencer832254e2007-02-02 02:16:23 +00008define i32 @f1(i32 %a, i32 %b) {
Rafael Espindola0a200602006-09-08 17:36:23 +00009entry:
Reid Spencer832254e2007-02-02 02:16:23 +000010 %tmp2 = and i32 %b, %a ; <i32> [#uses=1]
11 ret i32 %tmp2
Rafael Espindola0a200602006-09-08 17:36:23 +000012}
13
Reid Spencer832254e2007-02-02 02:16:23 +000014define i32 @f2(i32 %a, i32 %b) {
Rafael Espindola0a200602006-09-08 17:36:23 +000015entry:
Reid Spencer832254e2007-02-02 02:16:23 +000016 %tmp2 = or i32 %b, %a ; <i32> [#uses=1]
17 ret i32 %tmp2
Rafael Espindola0a200602006-09-08 17:36:23 +000018}
19
Reid Spencer832254e2007-02-02 02:16:23 +000020define i32 @f3(i32 %a, i32 %b) {
Rafael Espindola0a200602006-09-08 17:36:23 +000021entry:
Reid Spencer832254e2007-02-02 02:16:23 +000022 %tmp2 = xor i32 %b, %a ; <i32> [#uses=1]
23 ret i32 %tmp2
Rafael Espindola0a200602006-09-08 17:36:23 +000024}
25
Reid Spencer832254e2007-02-02 02:16:23 +000026define i32 @f4(i32 %a, i32 %b) {
Rafael Espindola0a200602006-09-08 17:36:23 +000027entry:
Reid Spencer832254e2007-02-02 02:16:23 +000028 %tmp3 = shl i32 %a, %b ; <i32> [#uses=1]
29 ret i32 %tmp3
Rafael Espindola0a200602006-09-08 17:36:23 +000030}
31
Reid Spencer832254e2007-02-02 02:16:23 +000032define i32 @f5(i32 %a, i32 %b) {
Rafael Espindola0a200602006-09-08 17:36:23 +000033entry:
Reid Spencer832254e2007-02-02 02:16:23 +000034 %tmp3 = ashr i32 %a, %b ; <i32> [#uses=1]
35 ret i32 %tmp3
Rafael Espindola0a200602006-09-08 17:36:23 +000036}