]> granicus.if.org Git - llvm/commitdiff
Revert r351584: "GlobalISel: Verify g_zextload and g_sextload"
authorAmara Emerson <aemerson@apple.com>
Sat, 19 Jan 2019 00:36:11 +0000 (00:36 +0000)
committerAmara Emerson <aemerson@apple.com>
Sat, 19 Jan 2019 00:36:11 +0000 (00:36 +0000)
This new assertion triggered on the AArch64 GlobalISel bots. Reverting while it's being investigated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351617 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineVerifier.cpp
test/CodeGen/MIR/AArch64/invalid-extload.mir [deleted file]

index a19049c7cd3073e5a9ab354e08c4b280da47a3be..c11b6d4bb22e4a0c89be7a5862cddc08bae1661a 100644 (file)
@@ -986,24 +986,11 @@ void MachineVerifier::visitMachineInstrBefore(const MachineInstr *MI) {
     break;
   case TargetOpcode::G_LOAD:
   case TargetOpcode::G_STORE:
-  case TargetOpcode::G_ZEXTLOAD:
-  case TargetOpcode::G_SEXTLOAD:
     // Generic loads and stores must have a single MachineMemOperand
     // describing that access.
-    if (!MI->hasOneMemOperand()) {
+    if (!MI->hasOneMemOperand())
       report("Generic instruction accessing memory must have one mem operand",
              MI);
-    } else {
-      if (MI->getOpcode() == TargetOpcode::G_ZEXTLOAD ||
-          MI->getOpcode() == TargetOpcode::G_SEXTLOAD) {
-        const MachineMemOperand &MMO = **MI->memoperands_begin();
-        LLT DstTy = MRI->getType(MI->getOperand(0).getReg());
-        if (MMO.getSize() * 8 >= DstTy.getSizeInBits()) {
-          report("Generic extload must have a narrower memory type", MI);
-        }
-      }
-    }
-
     break;
   case TargetOpcode::G_PHI: {
     LLT DstTy = MRI->getType(MI->getOperand(0).getReg());
diff --git a/test/CodeGen/MIR/AArch64/invalid-extload.mir b/test/CodeGen/MIR/AArch64/invalid-extload.mir
deleted file mode 100644 (file)
index cce2639..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# RUN: not llc -mtriple=aarch64-none-linux-gnu -run-pass none -o - %s 2>&1 | FileCheck %s
-
-# CHECK: *** Bad machine code: Generic extload must have a narrower memory type ***
-# CHECK: *** Bad machine code: Generic extload must have a narrower memory type ***
-# CHECK: *** Bad machine code: Generic extload must have a narrower memory type ***
-# CHECK: *** Bad machine code: Generic extload must have a narrower memory type ***
-# CHECK: *** Bad machine code: Generic instruction accessing memory must have one mem operand ***
-# CHECK: *** Bad machine code: Generic instruction accessing memory must have one mem operand ***
-
----
-name: invalid_extload_memory_sizes
-body: |
-  bb.0:
-
-    %0:_(p0) = COPY $x0
-    %1:_(s64) = G_ZEXTLOAD %0(p0) :: (load 8)
-    %2:_(s64) = G_ZEXTLOAD %0(p0) :: (load 16)
-    %3:_(s64) = G_SEXTLOAD %0(p0) :: (load 8)
-    %4:_(s64) = G_SEXTLOAD %0(p0) :: (load 16)
-    %5:_(s64) = G_ZEXTLOAD %0(p0)
-    %6:_(s64) = G_SEXTLOAD %0(p0)
-
-...