mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
25 lines
443 B
LLVM
25 lines
443 B
LLVM
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
|
||
|
|
||
|
declare void @free_v()
|
||
|
|
||
|
define void @f(i32* %x, i32 %c32, i32* %y) {
|
||
|
; CHECK-LABEL: f
|
||
|
entry:
|
||
|
%v = load i32, i32* %x, !invariant.load !0
|
||
|
; CHECK: movl (%rdi), %ebx
|
||
|
; CHECK: free_v
|
||
|
; CHECK-NOT: movl (%rdi), %ebx
|
||
|
call void @free_v()
|
||
|
%c = icmp ne i32 %c32, 0
|
||
|
br i1 %c, label %left, label %merge
|
||
|
|
||
|
left:
|
||
|
store i32 %v, i32* %y
|
||
|
br label %merge
|
||
|
|
||
|
merge:
|
||
|
ret void
|
||
|
}
|
||
|
|
||
|
!0 = !{}
|