diff options
author | Chris Lattner <sabre@nondot.org> | 2011-01-02 23:19:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-01-02 23:19:45 +0000 |
commit | 91139ccd995149dd0d5e4ab3604d9239e1f90a54 (patch) | |
tree | da2171f69cda77caab338fefb45b41e18466b8ff /test/Transforms | |
parent | cc9eab26b3867fa4a835deb518a6a606882e8f49 (diff) | |
download | external_llvm-91139ccd995149dd0d5e4ab3604d9239e1f90a54.zip external_llvm-91139ccd995149dd0d5e4ab3604d9239e1f90a54.tar.gz external_llvm-91139ccd995149dd0d5e4ab3604d9239e1f90a54.tar.bz2 |
add DEBUG and -stats output to earlycse.
Teach it to CSE the rest of the non-side-effecting instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/EarlyCSE/basic.ll | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/Transforms/EarlyCSE/basic.ll b/test/Transforms/EarlyCSE/basic.ll index d42f503..6cfd0a9 100644 --- a/test/Transforms/EarlyCSE/basic.ll +++ b/test/Transforms/EarlyCSE/basic.ll @@ -6,16 +6,27 @@ define void @test1(i8 %V, i32 *%P) { %A = bitcast i64 42 to double ;; dead %B = add i32 4, 19 ;; constant folds store i32 %B, i32* %P - ; CHECK-NEXT: store i32 23, i32* %P %C = zext i8 %V to i32 %D = zext i8 %V to i32 ;; CSE volatile store i32 %C, i32* %P volatile store i32 %D, i32* %P - ; CHECK-NEXT: %C = zext i8 %V to i32 ; CHECK-NEXT: volatile store i32 %C ; CHECK-NEXT: volatile store i32 %C + + %E = add i32 %C, %C + %F = add i32 %C, %C + volatile store i32 %E, i32* %P + volatile store i32 %F, i32* %P + ; CHECK-NEXT: %E = add i32 %C, %C + ; CHECK-NEXT: volatile store i32 %E + ; CHECK-NEXT: volatile store i32 %E + + %G = add nuw i32 %C, %C ;; not a CSE with E + volatile store i32 %G, i32* %P + ; CHECK-NEXT: %G = add nuw i32 %C, %C + ; CHECK-NEXT: volatile store i32 %G ret void } |