2004-11-07 06:08:43 +00:00
|
|
|
; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
|
|
|
|
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
|
|
|
|
; RUN: diff %t1.ll %t2.ll
|
|
|
|
|
2004-06-11 02:29:57 +00:00
|
|
|
|
2004-06-12 19:19:14 +00:00
|
|
|
declare bool %llvm.isunordered(float, float)
|
|
|
|
declare bool %llvm.isunordered(double, double)
|
|
|
|
|
2005-02-28 19:31:42 +00:00
|
|
|
declare void %llvm.prefetch(sbyte*, uint, uint)
|
|
|
|
|
2005-05-03 17:00:48 +00:00
|
|
|
declare uint %llvm.ctpop(uint)
|
|
|
|
declare ushort %llvm.cttz(ushort)
|
|
|
|
declare ulong %llvm.ctlz(ulong)
|
2005-05-03 16:49:48 +00:00
|
|
|
|
2004-06-11 01:06:40 +00:00
|
|
|
implementation
|
|
|
|
|
|
|
|
; Test llvm intrinsics
|
|
|
|
;
|
2004-06-11 02:29:57 +00:00
|
|
|
void %libm() {
|
2004-06-12 19:19:14 +00:00
|
|
|
call bool %llvm.isunordered(float 0.0, float 1.0)
|
2004-06-15 21:29:40 +00:00
|
|
|
call bool %llvm.isunordered(double 0.0, double 0x7FF8000000000000)
|
2005-02-28 19:31:42 +00:00
|
|
|
call void %llvm.prefetch(sbyte* null, uint 1, uint 3)
|
2005-05-03 16:49:48 +00:00
|
|
|
call uint %llvm.ctpop(uint 3)
|
|
|
|
call ushort %llvm.cttz(ushort 7)
|
|
|
|
call ulong %llvm.ctlz(ulong 65000)
|
2004-06-11 01:06:40 +00:00
|
|
|
ret void
|
2004-06-11 02:29:57 +00:00
|
|
|
}
|
2005-05-09 04:47:32 +00:00
|
|
|
|
|
|
|
; FIXME: test ALL the intrinsics in this file.
|