[llvm] 6c40abb - Revert "[MachineVerifier] Diagnose invalid INSERT_SUBREGs"
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 16 09:54:18 PDT 2021
Author: Jon Roelofs
Date: 2021-07-16T09:53:55-07:00
New Revision: 6c40abb6fe055c8a4063567430656dd4e35d338f
URL: https://github.com/llvm/llvm-project/commit/6c40abb6fe055c8a4063567430656dd4e35d338f
DIFF: https://github.com/llvm/llvm-project/commit/6c40abb6fe055c8a4063567430656dd4e35d338f.diff
LOG: Revert "[MachineVerifier] Diagnose invalid INSERT_SUBREGs"
This reverts commit dd57ba1a17b93dbe211d04cb2d4de5f6dc898d60.
It broke some tests: http://45.33.8.238/linux/51314/step_12.txt
Added:
Modified:
llvm/lib/CodeGen/MachineVerifier.cpp
llvm/test/CodeGen/X86/domain-reassignment.mir
Removed:
llvm/test/MachineVerifier/test_insert_subreg.mir
################################################################################
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index dd4a925957331..6b8c9f460567f 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -1782,15 +1782,6 @@ void MachineVerifier::visitMachineInstrBefore(const MachineInstr *MI) {
// TODO: verify we have properly encoded deopt arguments
} break;
- case TargetOpcode::INSERT_SUBREG: {
- unsigned InsertedSize =
- TRI->getRegSizeInBits(MI->getOperand(2).getReg(), *MRI);
- unsigned SubRegSize = TRI->getSubRegIdxSize(MI->getOperand(3).getImm());
- if (InsertedSize != SubRegSize) {
- report("INSERT_SUBREG expected matching subreg size for operand 2", MI);
- break;
- }
- } break;
}
}
diff --git a/llvm/test/CodeGen/X86/domain-reassignment.mir b/llvm/test/CodeGen/X86/domain-reassignment.mir
index 75bfeec188ae7..192c2c11d19d3 100644
--- a/llvm/test/CodeGen/X86/domain-reassignment.mir
+++ b/llvm/test/CodeGen/X86/domain-reassignment.mir
@@ -190,7 +190,7 @@ body: |
%2 = PHI %1, %bb.2, %0, %bb.1
%17 = IMPLICIT_DEF
- %16 = INSERT_SUBREG %17, %2, %subreg.sub_8bit_hi
+ %16 = INSERT_SUBREG %17, %2, 1
%18 = COPY %16
%19 = COPY %6
%21 = IMPLICIT_DEF
@@ -305,7 +305,7 @@ body: |
%18 = ADD8rr %17, %14, implicit-def dead $eflags
%8 = IMPLICIT_DEF
- %9 = INSERT_SUBREG %8, %18, %subreg.sub_8bit_hi
+ %9 = INSERT_SUBREG %8, %18, 1
%10 = COPY %9
%11 = VMOVAPDZrrk %2, killed %10, %1
VMOVAPDZmr %0, 1, $noreg, 0, $noreg, killed %11
@@ -423,7 +423,7 @@ body: |
%17 = XOR16rr %16, %12, implicit-def dead $eflags
%8 = IMPLICIT_DEF
- %9 = INSERT_SUBREG %8, %17, %subreg.sub_16bit
+ %9 = INSERT_SUBREG %8, %17, 3
%10 = COPY %9
%11 = VMOVAPSZrrk %2, killed %10, %1
VMOVAPSZmr %0, 1, $noreg, 0, $noreg, killed %11
diff --git a/llvm/test/MachineVerifier/test_insert_subreg.mir b/llvm/test/MachineVerifier/test_insert_subreg.mir
deleted file mode 100644
index 728fc0b04c952..0000000000000
--- a/llvm/test/MachineVerifier/test_insert_subreg.mir
+++ /dev/null
@@ -1,29 +0,0 @@
-#RUN: not --crash llc -march=aarch64 -o - -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s
-# REQUIRES: aarch64-registered-target
-
----
-name: test_insert_subreg
-legalized: true
-regBankSelected: false
-selected: false
-tracksRegLiveness: true
-liveins:
-body: |
- bb.0:
- liveins: $s0, $h1
-
- %0:fpr32 = COPY $s0
-
- ; CHECK: *** Bad machine code: INSERT_SUBREG expected matching subreg size for operand 2 ***
- %1:fpr128 = IMPLICIT_DEF
- %2:fpr128 = INSERT_SUBREG %1:fpr128, %0:fpr32, %subreg.hsub
-
- ; CHECK: *** Bad machine code: INSERT_SUBREG expected matching subreg size for operand 2 ***
- %3:fpr128 = IMPLICIT_DEF
- %4:fpr128 = INSERT_SUBREG %3:fpr128, %0:fpr32, %subreg.dsub
-
- ; CHECK-NOT: *** Bad machine code:
- %7:fpr128 = IMPLICIT_DEF
- %8:fpr128 = INSERT_SUBREG %7:fpr128, %0:fpr32, %subreg.ssub
-
-...
More information about the llvm-commits
mailing list