mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
17 lines
378 B
LLVM
17 lines
378 B
LLVM
|
; RUN: llvm-as < %s | llc -march=x86 | grep {movzbl.7(%...)}
|
||
|
; RUN: llvm-as < %s | llc -march=x86 | not grep leal
|
||
|
|
||
|
define i8 @test(i32 *%P) nounwind {
|
||
|
%Q = getelementptr i32* %P, i32 1
|
||
|
%R = bitcast i32* %Q to i8*
|
||
|
%S = load i8* %R
|
||
|
%T = icmp eq i8 %S, 0
|
||
|
br i1 %T, label %TB, label %F
|
||
|
TB:
|
||
|
ret i8 4
|
||
|
F:
|
||
|
%U = getelementptr i8* %R, i32 3
|
||
|
%V = load i8* %U
|
||
|
ret i8 %V
|
||
|
}
|