blob: 41ea1b3873046e8a9fd425ab9a7e19a0e53c7a13 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Ensure constant propogation of 'not' instructions is working correctly.
2
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00003; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep xor
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00005define i32 @test1() {
6 %R = xor i32 4, -1 ; <i32> [#uses=1]
7 ret i32 %R
Dan Gohmanf17a25c2007-07-18 16:29:46 +00008}
9
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000010define i32 @test2() {
11 %R = xor i32 -23, -1 ; <i32> [#uses=1]
12 ret i32 %R
Dan Gohmanf17a25c2007-07-18 16:29:46 +000013}
14
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000015define i1 @test3() {
16 %R = xor i1 true, true ; <i1> [#uses=1]
17 ret i1 %R
Dan Gohmanf17a25c2007-07-18 16:29:46 +000018}
19