File: fast-isel-args.ll

package info (click to toggle)
llvm-toolchain-3.4 1%3A3.4.2-13
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 253,236 kB
  • ctags: 276,203
  • sloc: cpp: 1,665,580; ansic: 298,647; asm: 206,157; objc: 84,350; python: 73,119; sh: 23,466; perl: 5,679; makefile: 5,542; ml: 5,250; pascal: 2,467; lisp: 1,420; xml: 679; cs: 236; csh: 117
file content (25 lines) | stat: -rw-r--r-- 627 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
; RUN: llc < %s -fast-isel -fast-isel-abort -fast-isel-abort-args -verify-machineinstrs -mtriple=x86_64-apple-darwin10

; Just make sure these don't abort when lowering the arguments.
define i32 @t1(i32 %a, i32 %b, i32 %c) {
entry:
  %add = add nsw i32 %b, %a
  %add1 = add nsw i32 %add, %c
  ret i32 %add1
}

define i64 @t2(i64 %a, i64 %b, i64 %c) {
entry:
  %add = add nsw i64 %b, %a
  %add1 = add nsw i64 %add, %c
  ret i64 %add1
}

define i64 @t3(i32 %a, i64 %b, i32 %c) {
entry:
  %conv = sext i32 %a to i64
  %add = add nsw i64 %conv, %b
  %conv1 = sext i32 %c to i64
  %add2 = add nsw i64 %add, %conv1
  ret i64 %add2
}