blob: 799cecaae60a98ae345929fb68b8d76b67098155 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Ensure constant propogation of 'not' instructions is working correctly.
2
Dan Gohman3c7d3082009-09-11 18:01:28 +00003; RUN: opt < %s -constprop -die -S | 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