[PATCH] D47453: [X86] Emit BZHI when mask is ~(-1 << nbits))
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 4 13:35:04 PDT 2018
craig.topper added inline comments.
================
Comment at: lib/Target/X86/X86InstrInfo.td:2445
- def : Pat<(and (loadi32 addr:$src), (add (shl 1, GR8:$lz), -1)),
- (BZHI32rm addr:$src,
- (INSERT_SUBREG (i32 (IMPLICIT_DEF)), GR8:$lz, sub_8bit))>;
+ multiclass bmi_bzhi_patterns<RegisterClass RC, int bitwidth, Intrinsic Int,
+ Intrinsic DstInt, X86MemOperand x86memop,
----------------
I'm thorougly confused as to how this many arguments are "Intrinsic". I wouldn't have expected that to work unless Intrinsic is very loosely defined. DstMemInt and DstInt should be of type "Instruction". And they should probably be DstMemInst and DstInst. I think "Int" should be of type ValueType and renamed to VT.
Repository:
rL LLVM
https://reviews.llvm.org/D47453
More information about the llvm-commits
mailing list