diff options
| author | Pablo Barrio <pablo.barrio@arm.com> | 2016-11-15 15:42:23 +0000 |
|---|---|---|
| committer | Pablo Barrio <pablo.barrio@arm.com> | 2016-11-15 15:42:23 +0000 |
| commit | 4f80c93a2ed931fc71acce58383eee1a67679878 (patch) | |
| tree | 99129751836e3a8cf4bd6a7d5e671324afaf3e36 /llvm/test | |
| parent | 5f782bb0489046017c7023287e4592c0f2b71758 (diff) | |
| download | bcm5719-llvm-4f80c93a2ed931fc71acce58383eee1a67679878.tar.gz bcm5719-llvm-4f80c93a2ed931fc71acce58383eee1a67679878.zip | |
Revert "[JumpThreading] Unfold selects that depend on the same condition"
This reverts commit ac54d0066c478a09c7cd28d15d0f9ff8af984afc.
llvm-svn: 286976
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/JumpThreading/unfold-selects-same-cond.ll | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/llvm/test/Transforms/JumpThreading/unfold-selects-same-cond.ll b/llvm/test/Transforms/JumpThreading/unfold-selects-same-cond.ll deleted file mode 100644 index ef01b0d1990..00000000000 --- a/llvm/test/Transforms/JumpThreading/unfold-selects-same-cond.ll +++ /dev/null @@ -1,45 +0,0 @@ -; RUN: opt < %s -jump-threading -instcombine -simplifycfg -S | FileCheck %s - -; The three selects are jump-threaded so that instcombine can optimize, and -; simplifycfg should turn the result into a single select. -define i32 @f(i32 %a, i32 %b) { -; CHECK: select -; CHECK-NOT: select -entry: - %0 = and i32 %a, 1 - %1 = and i32 %b, 1 - %xor = xor i32 %1, %a - %shr32 = lshr i32 %a, 1 - %cmp10 = icmp eq i32 %xor, 1 - %2 = xor i32 %b, 12345 - %b.addr.1 = select i1 %cmp10, i32 %2, i32 %b - %shr1633 = lshr i32 %b.addr.1, 1 - %3 = or i32 %shr1633, 54321 - %b.addr.2 = select i1 %cmp10, i32 %3, i32 %shr1633 - %shr1634 = lshr i32 %b.addr.2, 2 - %4 = or i32 %shr1634, 54320 - %b.addr.3 = select i1 %cmp10, i32 %4, i32 %shr1634 - ret i32 %b.addr.3 -} - -; Case where the condition is not only used as condition but also as the -; true or false value in at least one of the selects. -define i1 @g(i32 %a, i32 %b) { -; CHECK: select -; CHECK-NOT: select -entry: - %0 = and i32 %a, 1 - %1 = and i32 %b, 1 - %xor = xor i32 %1, %a - %shr32 = lshr i32 %a, 1 - %cmp10 = icmp eq i32 %xor, 1 - %2 = xor i32 %b, 12345 - %b.addr.1 = select i1 %cmp10, i32 %2, i32 %b - %shr1633 = lshr i32 %b.addr.1, 1 - %3 = or i32 %shr1633, 54321 - %b.addr.2 = select i1 %cmp10, i32 %3, i32 %shr1633 - %shr1634 = lshr i32 %b.addr.2, 2 - %4 = icmp eq i32 %shr1634, 54320 - %b.addr.3 = select i1 %cmp10, i1 %4, i1 %cmp10 - ret i1 %b.addr.3 -} |

