forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Just mark the sign bit as known zero, rather than any other irrelevan…
…t bits known zero in the LHS. Fixes PR12541. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155818 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
bfbab99
commit 5ff30e7
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
} |