blob: 2da4e74c89a7d632f47bfb834e203c68af2275bd [file] [log] [blame]
Jim Grosbach0f448b52010-10-08 00:47:59 +00001;RUN: llc -mtriple=armv7-apple-darwin -show-mc-encoding < %s | FileCheck %s
2
3
4;FIXME: Once the ARM integrated assembler is up and going, these sorts of tests
5; should run on .s source files rather than using llc to generate the
6; assembly.
7
8define i32 @foo(i32 %a, i32 %b) nounwind ssp {
9entry:
10; CHECK: foo
11; CHECK: 0xf0,0x00,0xf0,0x07
Jim Grosbach56ac9072010-10-08 21:45:55 +000012; CHECK: 0x1e,0xff,0x2f,0xe1
Jim Grosbach0f448b52010-10-08 00:47:59 +000013
14 tail call void @llvm.trap()
15 ret i32 undef
16}
17
Jim Grosbach56ac9072010-10-08 21:45:55 +000018define i32 @f2(i32 %a, i32 %b) nounwind readnone ssp {
19entry:
20; CHECK: f2
21; CHECK: 0x00,0x00,0x81,0xe0
22; CHECK: 0x1e,0xff,0x2f,0xe1
23 %add = add nsw i32 %b, %a
24 ret i32 %add
25}
Jim Grosbach0f448b52010-10-08 00:47:59 +000026declare void @llvm.trap() nounwind