Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 1837dbf

Browse files
author
Krzysztof Parzyszek
committed
[Hexagon] Handle *Low8 register classes in early if-conversion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325606 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 771994b commit 1837dbf

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

lib/Target/Hexagon/HexagonEarlyIfConv.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -765,9 +765,11 @@ unsigned HexagonEarlyIfConversion::buildMux(MachineBasicBlock *B,
765765
unsigned Opc = 0;
766766
switch (DRC->getID()) {
767767
case Hexagon::IntRegsRegClassID:
768+
case Hexagon::IntRegsLow8RegClassID:
768769
Opc = Hexagon::C2_mux;
769770
break;
770771
case Hexagon::DoubleRegsRegClassID:
772+
case Hexagon::GeneralDoubleLow8RegsRegClassID:
771773
Opc = Hexagon::PS_pselect;
772774
break;
773775
case Hexagon::HvxVRRegClassID:
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# RUN: llc -march=hexagon -run-pass hexagon-early-if %s -o - | FileCheck %s
2+
3+
# Make sure that early if-conversion handles the *low8 register classes:
4+
# CHECK: intregslow8 = C2_mux
5+
# CHECK: generaldoublelow8regs = PS_pselect
6+
7+
---
8+
name: fred
9+
tracksRegLiveness: true
10+
body: |
11+
bb.0:
12+
liveins: $r0, $r1
13+
%0:intregslow8 = COPY $r0
14+
%1:intregslow8 = COPY $r1
15+
%2:generaldoublelow8regs = A2_tfrpi 1
16+
%3:predregs = C2_cmpeq %0, %1
17+
J2_jumpf %3, %bb.2, implicit-def $pc
18+
bb.1:
19+
%4:intregslow8 = A2_addi %0, 1
20+
%5:generaldoublelow8regs = A2_tfrpi 0
21+
bb.2:
22+
%6:intregslow8 = PHI %0, %bb.0, %4, %bb.1
23+
%7:generaldoublelow8regs = PHI %2, %bb.0, %5, %bb.1
24+
$r0 = COPY %6
25+
$d1 = COPY %7
26+
J2_jumpr $r31, implicit $r0, implicit $d1, implicit-def $pc
27+
...

0 commit comments

Comments
 (0)