summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/2012-04-30-SRem.ll
blob: a285d5aea5e514111f26f4daa8dc39f6dc87274c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
; RUN: opt -instcombine -S < %s | FileCheck %s
; PR12541

define i32 @foo(i32 %x) {
  %y = xor i32 %x, 3
  %z = srem i32 1656690544, %y
  %sext = shl i32 %z, 24
  %s = ashr exact i32 %sext, 24
  ret i32 %s
; CHECK-NOT: and
; The shifts were wrongly being turned into an and with 112
}