2002-05-07 20:22:12 +00:00
|
|
|
; Ensure constant propogation of 'not' instructions is working correctly.
|
|
|
|
|
2002-08-14 19:26:34 +00:00
|
|
|
; RUN: if as < %s | opt -constprop -die | dis | grep xor
|
2002-05-07 20:22:12 +00:00
|
|
|
; RUN: then exit 1
|
|
|
|
; RUN: else exit 0
|
|
|
|
; RUN: fi
|
|
|
|
|
|
|
|
int "test1"() {
|
2002-08-14 19:26:34 +00:00
|
|
|
%R = xor int 4, -1
|
2002-05-07 20:22:12 +00:00
|
|
|
ret int %R
|
|
|
|
}
|
|
|
|
|
|
|
|
int "test2"() {
|
2002-08-14 19:26:34 +00:00
|
|
|
%R = xor int -23, -1
|
2002-05-07 20:22:12 +00:00
|
|
|
ret int %R
|
|
|
|
}
|
|
|
|
|
|
|
|
bool "test3"() {
|
2002-08-14 19:26:34 +00:00
|
|
|
%R = xor bool true, true
|
2002-05-07 20:22:12 +00:00
|
|
|
ret bool %R
|
|
|
|
}
|
|
|
|
|