[PATCH] D42646: [X86] Avoid using high register trick for test instruction

Nirav Dave via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 09:44:31 PST 2018


niravd added inline comments.


================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:3101
       // For example, "testq %rax, $268468232" to "testl %eax, $268468232".
-      if (isUInt<32>(Mask) && N0.getValueType() == MVT::i64 &&
+      if (isUInt<32>(Mask) &&
+          (N0.getValueType() == MVT::i32 || N0.getValueType() == MVT::i64) &&
----------------
We're now generating a testl but we've passed the logic to reduce to the smaller to testw. Can you fold that logic into this and add a test case (e.g. replicate testOperand32 with optsize set)?


Repository:
  rL LLVM

https://reviews.llvm.org/D42646





More information about the llvm-commits mailing list