llvm.org GIT mirror llvm / a9338b6 test / ExecutionEngine / 2003-01-15-AlignmentTest.ll
a9338b6

Tree @a9338b6 (Download .tar.gz)

2003-01-15-AlignmentTest.ll @a9338b6raw · history · blame

; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
; RUN: lli %t.bc > /dev/null


int %bar(sbyte* %X) {
	%P = alloca double   ; pointer should be 4 byte aligned!
	%R = cast double* %P to int
	%A = and int %R, 3
	ret int %A
}

int %main() {
	%SP = alloca sbyte
	%X = add uint 0, 0
	alloca sbyte, uint %X

	call int %bar(sbyte* %SP)
	ret int %0
}