blob: e6383986795542f68c0401fd25833c3b8ca5d500 [file] [log] [blame]
Zhou Sheng96b366d2007-01-19 01:35:08 +00001; RUN: llvm-as %s -o - | llvm-dis > %t.ll
2; RUN: diff %t.ll %s.out
3
4; test 1 bit
5;
Reid Spencere3ff5ad2007-01-26 08:25:06 +00006@b = constant i1 add(i1 1 , i1 1)
7@c = constant i1 add(i1 -1, i1 1)
8@d = constant i1 add(i1 -1, i1 -1)
9@e = constant i1 sub(i1 -1, i1 1)
10@f = constant i1 sub(i1 1 , i1 -1)
11@g = constant i1 sub(i1 1 , i1 1)
Zhou Sheng96b366d2007-01-19 01:35:08 +000012
Reid Spencer55fc8a42007-02-27 19:26:40 +000013@h = constant i1 shl(i1 1 , i1 1) ; undefined
Reid Spencer832254e2007-02-02 02:16:23 +000014@i = constant i1 shl(i1 1 , i1 0)
Reid Spencer51c1c032007-02-27 02:34:02 +000015@j = constant i1 lshr(i1 1, i1 1) ; undefined
16@m = constant i1 ashr(i1 1, i1 1) ; undefined
Zhou Sheng96b366d2007-01-19 01:35:08 +000017
Reid Spencere3ff5ad2007-01-26 08:25:06 +000018@n = constant i1 mul(i1 -1, i1 1)
Reid Spencer55fc8a42007-02-27 19:26:40 +000019@o = constant i1 sdiv(i1 -1, i1 1) ; overflow
20@p = constant i1 sdiv(i1 1 , i1 -1); overflow
Reid Spencere3ff5ad2007-01-26 08:25:06 +000021@q = constant i1 udiv(i1 -1, i1 1)
22@r = constant i1 udiv(i1 1, i1 -1)
Reid Spencer51c1c032007-02-27 02:34:02 +000023@s = constant i1 srem(i1 -1, i1 1) ; overflow
Reid Spencere3ff5ad2007-01-26 08:25:06 +000024@t = constant i1 urem(i1 -1, i1 1)
Reid Spencer5957d8f2007-03-24 21:55:26 +000025@u = constant i1 srem(i1 1, i1 -1) ; overflow