blob: 022a513ae42283d2ac2eed28878b1796b3e321d2 [file] [log] [blame]
Chris Lattnere473a342002-05-07 20:22:12 +00001; Ensure constant propogation of 'not' instructions is working correctly.
2
Reid Spencer69ccadd2006-12-02 04:23:10 +00003; RUN: llvm-upgrade < %s | llvm-as | opt -constprop -die | llvm-dis | not grep xor
Chris Lattnere473a342002-05-07 20:22:12 +00004
5int "test1"() {
Chris Lattnerd0cad7a2002-08-14 19:26:34 +00006 %R = xor int 4, -1
Chris Lattnere473a342002-05-07 20:22:12 +00007 ret int %R
8}
9
10int "test2"() {
Chris Lattnerd0cad7a2002-08-14 19:26:34 +000011 %R = xor int -23, -1
Chris Lattnere473a342002-05-07 20:22:12 +000012 ret int %R
13}
14
15bool "test3"() {
Chris Lattnerd0cad7a2002-08-14 19:26:34 +000016 %R = xor bool true, true
Chris Lattnere473a342002-05-07 20:22:12 +000017 ret bool %R
18}
19