[PATCH] D19985: [Kryo] Use immediate #0 to zero a register

Haicheng Wu via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 19:44:30 PDT 2016

haicheng added inline comments.

Comment at: lib/Target/AArch64/AArch64InstrInfo.cpp:629-632
@@ -623,1 +628,6 @@
+  case AArch64::COPY:
+    return (Subtarget.getProcFamily() == AArch64Subtarget::Kryo &&
+            (MI.getOperand(1).getReg() == AArch64::WZR ||
+             MI.getOperand(1).getReg() == AArch64::XZR));
MatzeB wrote:
> Shouldn't this rather be "case AArch64::COPY: return true"?
> The whole purpose of this function is that some passes can decide whether to copy a value around with COPY or just recompute the value instead.
I agree with you.  I don't know why COPY is not included in the first place.  However, can I do it in a separate patch because it affects other subtargets?  This patch is supposed to affect Kryo only. 



More information about the llvm-commits mailing list