mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-07 01:54:50 +00:00
Update these test cases to use proper signatures for bswap which is now and overloaded intrinsic. Its name must be of the form llvm.bswap.i32.i32 since both the parameter and the result or of type "iAny". Also, the bit counting intrinsics changed to always return i32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35548 91177308-0d34-0410-b5e6-96231b3b80d8
60 lines
1.7 KiB
LLVM
60 lines
1.7 KiB
LLVM
; Make sure this testcase is supported by all code generators
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc
|
|
|
|
declare uint %llvm.ctpop.i64(ulong)
|
|
declare uint %llvm.ctpop.i32(uint)
|
|
declare uint %llvm.ctpop.i16(ushort)
|
|
declare uint %llvm.ctpop.i8(ubyte)
|
|
|
|
void %ctpoptest(ubyte %A, ushort %B, uint %C, ulong %D,
|
|
uint *%AP, uint* %BP, uint* %CP, uint* %DP) {
|
|
%a = call uint %llvm.ctpop.i8(ubyte %A)
|
|
%b = call uint %llvm.ctpop.i16(ushort %B)
|
|
%c = call uint %llvm.ctpop.i32(uint %C)
|
|
%d = call uint %llvm.ctpop.i64(ulong %D)
|
|
|
|
store uint %a, uint* %AP
|
|
store uint %b, uint* %BP
|
|
store uint %c, uint* %CP
|
|
store uint %d, uint* %DP
|
|
ret void
|
|
}
|
|
|
|
declare uint %llvm.ctlz.i64(ulong)
|
|
declare uint %llvm.ctlz.i32(uint)
|
|
declare uint %llvm.ctlz.i16(ushort)
|
|
declare uint %llvm.ctlz.i8(ubyte)
|
|
|
|
void %ctlztest(ubyte %A, ushort %B, uint %C, ulong %D,
|
|
uint *%AP, uint* %BP, uint* %CP, uint* %DP) {
|
|
%a = call uint %llvm.ctlz.i8(ubyte %A)
|
|
%b = call uint %llvm.ctlz.i16(ushort %B)
|
|
%c = call uint %llvm.ctlz.i32(uint %C)
|
|
%d = call uint %llvm.ctlz.i64(ulong %D)
|
|
|
|
store uint %a, uint* %AP
|
|
store uint %b, uint* %BP
|
|
store uint %c, uint* %CP
|
|
store uint %d, uint* %DP
|
|
ret void
|
|
}
|
|
|
|
declare uint %llvm.cttz.i64(ulong)
|
|
declare uint %llvm.cttz.i32(uint)
|
|
declare uint %llvm.cttz.i16(ushort)
|
|
declare uint %llvm.cttz.i8(ubyte)
|
|
|
|
void %cttztest(ubyte %A, ushort %B, uint %C, ulong %D,
|
|
uint *%AP, uint* %BP, uint* %CP, uint* %DP) {
|
|
%a = call uint %llvm.cttz.i8(ubyte %A)
|
|
%b = call uint %llvm.cttz.i16(ushort %B)
|
|
%c = call uint %llvm.cttz.i32(uint %C)
|
|
%d = call uint %llvm.cttz.i64(ulong %D)
|
|
|
|
store uint %a, uint* %AP
|
|
store uint %b, uint* %BP
|
|
store uint %c, uint* %CP
|
|
store uint %d, uint* %DP
|
|
ret void
|
|
}
|