[PATCH] D47453: [X86] Emit BZHI when mask is ~(-1 << nbits))

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 5 06:36:08 PDT 2018


lebedev.ri added inline comments.


================
Comment at: lib/Target/X86/X86InstrInfo.td:2465-2469
+    defm : _bmi_bzhi_pattern<(srl (shl RC:$src, (sub bitwidth, GR8:$lz)),
+                                  (sub bitwidth, GR8:$lz)),
+                             (srl (shl (x86memop addr:$src),
+                                        (sub bitwidth, GR8:$lz)),
+                                  (sub bitwidth, GR8:$lz)),
----------------
I understand that this still has some duplication.
I have tried reworking it further, but i do not yet understand how
to pass either `RC:$src` or `(x86memop addr:$src)` as `multiclass` param.


Repository:
  rL LLVM

https://reviews.llvm.org/D47453





More information about the llvm-commits mailing list