[PATCH] D71952: [X86][InstCombine] Add constant folding and simplification support for pdep and pext
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 28 01:38:48 PST 2019
craig.topper marked an inline comment as done.
craig.topper added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2522
+
+ while (Mask) {
+ // Isolate lowest set bit.
----------------
RKSimon wrote:
> Can you confirm this is correct? It doesn't seem to match:
>
> https://www.felixcloutier.com/x86/pdep
> https://www.chessprogramming.org/BMI2#PDEP
>
> But it might just be that my brain is still in a Christmas blur......
I think its right. BitToTest here is equivalent to "bb" from the chessprogramming page. BitToSet is the mask & -mask. I reused it clear the bit in Mask where they used mask &= mask - 1.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71952/new/
https://reviews.llvm.org/D71952
More information about the llvm-commits
mailing list