mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
17 lines
347 B
LLVM
17 lines
347 B
LLVM
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -mcpu=corei7 | FileCheck %s
|
||
|
|
||
|
define i64 @test1(i64 %x) nounwind {
|
||
|
entry:
|
||
|
%cmp = icmp eq i64 %x, 2
|
||
|
%add = add i64 %x, 1
|
||
|
%retval.0 = select i1 %cmp, i64 2, i64 %add
|
||
|
ret i64 %retval.0
|
||
|
|
||
|
; CHECK: test1:
|
||
|
; CHECK: leaq 1(%rdi), %rax
|
||
|
; CHECK: cmpq $2, %rdi
|
||
|
; CHECK: cmoveq %rdi, %rax
|
||
|
; CHECK: ret
|
||
|
|
||
|
}
|