blob: a74d5148994837302612861151defee0d5f1cc57 [file] [log] [blame]
Chris Lattnere473a342002-05-07 20:22:12 +00001; Ensure constant propogation of 'not' instructions is working correctly.
2
Chris Lattnerd0cad7a2002-08-14 19:26:34 +00003; RUN: if as < %s | opt -constprop -die | dis | grep xor
Chris Lattnere473a342002-05-07 20:22:12 +00004; RUN: then exit 1
5; RUN: else exit 0
6; RUN: fi
7
8int "test1"() {
Chris Lattnerd0cad7a2002-08-14 19:26:34 +00009 %R = xor int 4, -1
Chris Lattnere473a342002-05-07 20:22:12 +000010 ret int %R
11}
12
13int "test2"() {
Chris Lattnerd0cad7a2002-08-14 19:26:34 +000014 %R = xor int -23, -1
Chris Lattnere473a342002-05-07 20:22:12 +000015 ret int %R
16}
17
18bool "test3"() {
Chris Lattnerd0cad7a2002-08-14 19:26:34 +000019 %R = xor bool true, true
Chris Lattnere473a342002-05-07 20:22:12 +000020 ret bool %R
21}
22