[llvm] [RegAlloc][X86] Rematerialization of instructions with physical register (PR #198853)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 10:52:37 PDT 2026


================
@@ -30,6 +30,12 @@ using namespace llvm;
 
 #define DEBUG_TYPE "calcspillweights"
 
+cl::opt<bool> AllowRematerializePhysReg(
+    "allow-rematerialize-phys-reg",
+    cl::desc("Allow rematerialize instructions with physical register "
+             "definition, like POPCNT on x86 can write EFLAGS register."),
+    cl::init(false), cl::Hidden);
----------------
weiguozhi wrote:

I will remove this command line option and the new hook.

But I think when we want to enable this kind of rematerialization on AArch64 or PowerPC, we still need something similar.


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


More information about the llvm-commits mailing list