[PATCH] D44249: [SelectionDAG] Handle big-endian target BITCAST in computeKnownBits()

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 13 09:05:49 PDT 2018


jonpa added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2381
       for (unsigned i = 0; i != SubScale; ++i) {
         computeKnownBits(N0, Known2, SubDemandedElts.shl(i),
                          Depth + 1);
----------------
RKSimon wrote:
> Will this be correct? Does it need to be reversed for BE?
> ```
> SubDemandedElts.shl(ISLE ? i : (SubScale - 1 - i))
> ```
PING!

(Personally I think this is correct - it seems to me to otherwise simply again disregard endianness. First the input is analyzed, then the bitcast is performed in the same way as if writing to memory and then loading back. Only in this second step should any reversal take place, or?)




https://reviews.llvm.org/D44249





More information about the llvm-commits mailing list