[llvm] [X86] Run X86FastPreTileConfigPass only with FastISel. (PR #70754)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 18:58:45 PDT 2023


================
@@ -667,7 +667,9 @@ bool X86FastPreTileConfig::runOnMachineFunction(MachineFunction &MFunc) {
   bool HasVirtTileReg = false;
   for (unsigned I = 0, E = NumVirtRegs; I != E; ++I) {
     Register VirtReg = Register::index2VirtReg(I);
-    if (MRI->getRegClass(VirtReg)->getID() == X86::TILERegClassID) {
+    const TargetRegisterClass *RC = MRI->getRegClassOrNull(VirtReg);
+    assert(RC && "A register must have a class after FastISel");
----------------
arsenm wrote:

We probably should have a registers have a class function property to go with the others that the PM would enforce 

https://github.com/llvm/llvm-project/pull/70754


More information about the llvm-commits mailing list