nemanjai added a comment.

Amy, I am really sorry. I initially did not read the description of the 
instructions in the ISA carefully. The semantics of these instructions are not 
actually `(op (and a, b))`. The mask is used to determine if a leading/trailing 
zero is counted or skipped.
Take for example the following two binary values:

  Mask:  1001111
  Value: 0010011

the result of `cntlzdm Value, Mask` should be `3` whereas the result of `(ctlz 
(and Value, Mask))` would be `5`. Namely, the instruction will count the first 
leading zero, ignore the next two bits and then count the next two zeros.

So you will need to revert back to the initial implementation. I am so sorry 
about going back and forth like this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80941/new/

https://reviews.llvm.org/D80941



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to