Revert "[Hexagon] Some compound opportunities missed in presence of branches"
authorNico Weber <thakis@chromium.org>
Thu, 6 Jan 2022 20:32:14 +0000 (15:32 -0500)
committerNico Weber <thakis@chromium.org>
Thu, 6 Jan 2022 20:32:14 +0000 (15:32 -0500)
This reverts commit afdc6a0b8eeec1a8ebe52b103ac1fdcfb93db3b3.
Breaks check-lld, see e.g.:
https://lab.llvm.org/buildbot/#/builders/123/builds/8100/steps/8/logs/stdio

llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCompound.cpp
llvm/test/MC/Hexagon/bug28416.s [deleted file]

index 7d4828e..e7ade78 100644 (file)
@@ -365,10 +365,8 @@ static bool lookForCompound(MCInstrInfo const &MCII, MCContext &Context,
                MCI.begin() + HexagonMCInstrInfo::bundleInstructionsOffset;
            B != MCI.end(); ++B) {
         MCInst const *Inst = B->getInst();
-        if (JumpInst == Inst) {
-          BExtended = false;
+        if (JumpInst == Inst)
           continue;
-        }
         if (HexagonMCInstrInfo::isImmext(*Inst)) {
           BExtended = true;
           continue;
diff --git a/llvm/test/MC/Hexagon/bug28416.s b/llvm/test/MC/Hexagon/bug28416.s
deleted file mode 100644 (file)
index 237d577..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# RUN: llvm-mc -arch=hexagon -filetype=obj -o - %s | llvm-objdump -d -
-# r0 = r6 and jump ##undefined should compound to J4_jumpsetr
-
-# CHECK: { immext(#0)
-# CHECK:   r0 = r6 ; jump 0x0
-# CHECK:   r1 = memub(r6+#21)
-# CHECK:   memw(r9+#0) = r0 }
-{  memw(r9) = r0
-   r0 = r6
-   r1 = memub(r6+#21)
-   jump ##undefined }