diff options
| author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-04-28 21:56:33 +0000 |
|---|---|---|
| committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-04-28 21:56:33 +0000 |
| commit | 2065a2f4e60bad5315f8289612eadba3842a4071 (patch) | |
| tree | 1c8043685b9784b4f593ff64eb5fd9b5966e65b8 /llvm/test/CodeGen/Hexagon | |
| parent | 0b3acbb1dd1a6ffa3d81313528efa1dd3591d62a (diff) | |
| download | bcm5719-llvm-2065a2f4e60bad5315f8289612eadba3842a4071.tar.gz bcm5719-llvm-2065a2f4e60bad5315f8289612eadba3842a4071.zip | |
Properly handle PHIs with subregisters in UnreachableBlockElim
When a PHI operand has a subregister, create a COPY instead of simply
replacing the PHI output with the input it.
Differential Revision: https://reviews.llvm.org/D32650
llvm-svn: 301699
Diffstat (limited to 'llvm/test/CodeGen/Hexagon')
| -rw-r--r-- | llvm/test/CodeGen/Hexagon/unreachable-mbb-phi-subreg.mir | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Hexagon/unreachable-mbb-phi-subreg.mir b/llvm/test/CodeGen/Hexagon/unreachable-mbb-phi-subreg.mir new file mode 100644 index 00000000000..6d6549201ab --- /dev/null +++ b/llvm/test/CodeGen/Hexagon/unreachable-mbb-phi-subreg.mir @@ -0,0 +1,25 @@ +# RUN: llc -march=hexagon -run-pass unreachable-mbb-elimination %s -o - | FileCheck %s + +--- +name: fred +tracksRegLiveness: true +body: | + bb.0: + liveins: %d0 + successors: %bb.2 + + %0 : doubleregs = COPY %d0 + J2_jump %bb.2, implicit-def %pc + + bb.1: + successors: %bb.2 + A2_nop + + bb.2: + ; Make sure that the subregister from the PHI operand is preserved. + ; CHECK: %[[REG:[0-9]+]] = COPY %0.isub_lo + ; CHECK: %r0 = COPY %[[REG]] + %1 : intregs = PHI %0.isub_lo, %bb.0, %0.isub_hi, %bb.1 + %r0 = COPY %1 +... + |

