Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move ashr optimization from InstCombineShift to InstSimplify.
Refactor code, no functionality change, test case moved from instcombine to instsimplify. Differential Revision: http://reviews.llvm.org/D4102 llvm-svn: 213231
- Loading branch information
Suyog Sarda
committed
Jul 17, 2014
1 parent
ac6e39c
commit 6886241
Showing
4 changed files
with
15 additions
and
13 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
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
; RUN: opt < %s -instsimplify -S | FileCheck %s | ||
|
||
; CHECK-LABEL: @foo | ||
; CHECK-NOT: ashr | ||
define i32 @foo(i32 %x) { | ||
%o = and i32 %x, 1 | ||
%n = add i32 %o, -1 | ||
%t = ashr i32 %n, 17 | ||
ret i32 %t | ||
} |