blob: 9d8994c006132871f7f48505a4584262810e456c [file] [log] [blame]
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +00001; RUN: llvm-as < %s | llc -march=sparc | \
Dan Gohman8c89a502007-08-15 13:36:28 +00002; RUN: grep xnor | count 2
Dan Gohmanf17a25c2007-07-18 16:29:46 +00003
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +00004define i32 @test1(i32 %X, i32 %Y) {
5 %A = xor i32 %X, %Y ; <i32> [#uses=1]
6 %B = xor i32 %A, -1 ; <i32> [#uses=1]
7 ret i32 %B
Dan Gohmanf17a25c2007-07-18 16:29:46 +00008}
9
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +000010define i32 @test2(i32 %X, i32 %Y) {
11 %A = xor i32 %X, -1 ; <i32> [#uses=1]
12 %B = xor i32 %A, %Y ; <i32> [#uses=1]
13 ret i32 %B
Dan Gohmanf17a25c2007-07-18 16:29:46 +000014}
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +000015