blob: 973e82f860d4f8f6a7e3861cdcb7417d0fc53d95 [file] [log] [blame]
Tanya Lattner3f7706b2004-11-07 06:08:43 +00001; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
2; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3; RUN: diff %t1.ll %t2.ll
4
Chris Lattner86ee7762004-06-11 02:29:57 +00005
Alkis Evlogimenos96853722004-06-12 19:19:14 +00006declare bool %llvm.isunordered(float, float)
7declare bool %llvm.isunordered(double, double)
8
Chris Lattner47adf212005-02-28 19:31:42 +00009declare void %llvm.prefetch(sbyte*, uint, uint)
10
Andrew Lenharthf166ec62005-05-03 17:00:48 +000011declare uint %llvm.ctpop(uint)
12declare ushort %llvm.cttz(ushort)
13declare ulong %llvm.ctlz(ulong)
Andrew Lenharth279a7b22005-05-03 16:49:48 +000014
Alkis Evlogimenosfd39b302004-06-11 01:06:40 +000015implementation
16
17; Test llvm intrinsics
18;
Chris Lattner86ee7762004-06-11 02:29:57 +000019void %libm() {
Alkis Evlogimenos96853722004-06-12 19:19:14 +000020 call bool %llvm.isunordered(float 0.0, float 1.0)
Chris Lattner5e9a7ca2004-06-15 21:29:40 +000021 call bool %llvm.isunordered(double 0.0, double 0x7FF8000000000000)
Chris Lattner47adf212005-02-28 19:31:42 +000022 call void %llvm.prefetch(sbyte* null, uint 1, uint 3)
Andrew Lenharth279a7b22005-05-03 16:49:48 +000023 call uint %llvm.ctpop(uint 3)
24 call ushort %llvm.cttz(ushort 7)
25 call ulong %llvm.ctlz(ulong 65000)
Alkis Evlogimenosfd39b302004-06-11 01:06:40 +000026 ret void
Chris Lattner86ee7762004-06-11 02:29:57 +000027}
Reid Spencer87bb7c62005-05-09 04:47:32 +000028
29; FIXME: test ALL the intrinsics in this file.