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.
When (srl (anyextend x), c) is folded into (anyextend (srl x, c)), the high bits are not cleared. Add 'and' to clear off them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184575 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
2 changed files
with
21 additions
and
3 deletions.
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,16 @@ | ||
; RUN: llc < %s -mtriple=i686-pc-linux | FileCheck %s | ||
|
||
define i64 @foo(i32 %sum) { | ||
entry: | ||
%conv = sext i32 %sum to i64 | ||
%shr = lshr i64 %conv, 2 | ||
%or = or i64 4611686018360279040, %shr | ||
ret i64 %or | ||
} | ||
|
||
; CHECK: foo | ||
; CHECK: shrl $2 | ||
; CHECK: orl $-67108864 | ||
; CHECK-NOT: movl $-1 | ||
; CHECK: movl $1073741823 | ||
; CHECK: ret |