diff options
-rw-r--r-- | test/Transforms/InstCombine/add.ll | 8 | ||||
-rw-r--r-- | test/Transforms/InstCombine/sub.ll | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/add.ll b/test/Transforms/InstCombine/add.ll index 6359dde0bf..8868929ff6 100644 --- a/test/Transforms/InstCombine/add.ll +++ b/test/Transforms/InstCombine/add.ll @@ -169,3 +169,11 @@ int %test24(int %A) { %D = sub int %C, 2 ret int %D ;; A << 1 } + +long %test25(long %Y) { + %tmp.4 = shl long %Y, ubyte 2 + %tmp.12 = shl long %Y, ubyte 2 + %tmp.8 = add long %tmp.4, %tmp.12 ;; Y << 3 + ret long %tmp.8 +} + diff --git a/test/Transforms/InstCombine/sub.ll b/test/Transforms/InstCombine/sub.ll index ae0a120cdd..7a8f2acad9 100644 --- a/test/Transforms/InstCombine/sub.ll +++ b/test/Transforms/InstCombine/sub.ll @@ -111,3 +111,11 @@ int %test17(int %A) { %C = div int %B, 1234 ret int %C } + +long %test18(long %Y) { + %tmp.4 = shl long %Y, ubyte 2 + %tmp.12 = shl long %Y, ubyte 2 + %tmp.8 = sub long %tmp.4, %tmp.12 ;; 0 + ret long %tmp.8 +} + |