summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/sub-xor.ll
blob: 41e01fbdae8b38524e98c4aeda06a1f4335d8cc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
; RUN: opt -instcombine -S < %s | FileCheck %s

define i32 @test1(i32 %x) nounwind {
  %and = and i32 %x, 31
  %sub = sub i32 63, %and
  ret i32 %sub

; CHECK: @test1
; CHECK-NEXT: and i32 %x, 31
; CHECK-NEXT: xor i32 %and, 63
; CHECK-NEXT: ret
}