[llvm] 028444c - [Hexagon] Duplex error: wrong branch hint
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 7 12:04:19 PST 2022
Author: Michael Lambert
Date: 2022-01-07T12:04:01-08:00
New Revision: 028444c2b329ae4682b683cec70738afafcf18af
URL: https://github.com/llvm/llvm-project/commit/028444c2b329ae4682b683cec70738afafcf18af
DIFF: https://github.com/llvm/llvm-project/commit/028444c2b329ae4682b683cec70738afafcf18af.diff
LOG: [Hexagon] Duplex error: wrong branch hint
Added:
llvm/test/MC/Hexagon/bug15961.s
Modified:
llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp
index 05410893e31e..36d6c8c9f84b 100644
--- a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp
+++ b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp
@@ -284,8 +284,6 @@ unsigned HexagonMCInstrInfo::getDuplexCandidateGroup(MCInst const &MCI) {
case Hexagon::J2_jumprf:
case Hexagon::J2_jumprtnew:
case Hexagon::J2_jumprfnew:
- case Hexagon::J2_jumprtnewpt:
- case Hexagon::J2_jumprfnewpt:
case Hexagon::PS_jmprett:
case Hexagon::PS_jmpretf:
case Hexagon::PS_jmprettnew:
@@ -829,7 +827,6 @@ MCInst HexagonMCInstrInfo::deriveSubInst(MCInst const &Inst) {
Result.setOpcode(Hexagon::SL2_jumpr31_f);
break; // none SUBInst if (!p0) jumpr r31
case Hexagon::J2_jumprfnew:
- case Hexagon::J2_jumprfnewpt:
case Hexagon::PS_jmpretfnewpt:
case Hexagon::PS_jmpretfnew:
Result.setOpcode(Hexagon::SL2_jumpr31_fnew);
@@ -839,7 +836,6 @@ MCInst HexagonMCInstrInfo::deriveSubInst(MCInst const &Inst) {
Result.setOpcode(Hexagon::SL2_jumpr31_t);
break; // none SUBInst if (p0) jumpr r31
case Hexagon::J2_jumprtnew:
- case Hexagon::J2_jumprtnewpt:
case Hexagon::PS_jmprettnewpt:
case Hexagon::PS_jmprettnew:
Result.setOpcode(Hexagon::SL2_jumpr31_tnew);
diff --git a/llvm/test/MC/Hexagon/bug15961.s b/llvm/test/MC/Hexagon/bug15961.s
new file mode 100644
index 000000000000..44c872f93d87
--- /dev/null
+++ b/llvm/test/MC/Hexagon/bug15961.s
@@ -0,0 +1,17 @@
+# RUN: llvm-mc -arch=hexagon -mv65 -filetype=obj %s | llvm-objdump -d - | FileCheck %s
+#
+
+{
+p0=cmp.eq(r18,#0)
+if (p0.new) jumpr:nt r31
+}
+
+# The following had been getting duplexed to the :nt case
+{
+p0=cmp.eq(r18,#0)
+if (p0.new) jumpr:t r31
+}
+#CHECK: 59a03fc6 { p0 = cmp.eq(r18,#0); if (p0.new) jumpr:nt r31 }
+#CHECK: 75124000 { p0 = cmp.eq(r18,#0)
+#CHECK: 535fd800 if (p0.new) jumpr:t r31 }
+
More information about the llvm-commits
mailing list