[PATCH] D109963: [AArch64] Split bitmask immediate of bitwise AND operation

Daniel Kiss via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 15 13:41:22 PDT 2021


danielkiss added a comment.

This patch causes a compiler crash, the reduced reproducer is here> https://godbolt.org/z/71sThGE19



================
Comment at: llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp:129
+  // Check whether AND's operand is MOV with immediate.
+  MachineInstr *MovMI = MRI->getUniqueVRegDef(MI.getOperand(2).getReg());
+  MachineInstr *SubregToRegMI = nullptr;
----------------
With the chromium codebase we found getUniqueVRegDef returns null as it could normally.
I'd add a check for that.


================
Comment at: llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp:137-138
+
+  if (MovMI->getOpcode() != AArch64::MOVi32imm &&
+      MovMI->getOpcode() != AArch64::MOVi64imm)
+    return false;
----------------
Ditto.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109963/new/

https://reviews.llvm.org/D109963



More information about the llvm-commits mailing list