[PATCH] D22850: AVX-512: Removed AssertZext node before TRUNCATE

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 05:12:34 PDT 2016


RKSimon added inline comments.

================
Comment at: ../lib/Target/X86/X86InstrAVX512.td:2133
@@ +2132,3 @@
+           dyn_cast<ConstantSDNode>(N->getOperand(0)->getOperand(1)) &&
+           N->getOperand(0)->getConstantOperandVal(1) == 1));
+}]>;
----------------
delena wrote:
> eli.friedman wrote:
> > Maybe you could match this with patterns rather than C++ code?
> I can't find another solution right now. I don't want to set a new "truncate_z" node in DAG because the regular "truncate" may be merged with "ext" nodes. I'll add Simon, may be he has another idea?
Possibly split this into 2 simpler pat frags? trunc_setcc and trunc_mask_i1?

Also you should probably use isa<ConstantSDNode> instead of dyn_cast<ConstantSDNode>.


Repository:
  rL LLVM

https://reviews.llvm.org/D22850





More information about the llvm-commits mailing list