[PATCH] D34990: Fix endianness bug in DAGCombiner::visitTRUNCATE
Francois Pichet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 11 13:30:48 PDT 2017
fpichet added a comment.
I don't think there is any bug after all.. see PR comment.
I think everything is fine.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:8377
EVT IdxVT = TLI.getVectorIdxTy(DAG.getDataLayout());
+ unsigned Idx = DAG.getDataLayout().isBigEndian() ? 1 : 0;
return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SL, VT,
----------------
RKSimon wrote:
> I'm not sure this is generally correct - for example what about the (i16 trunc (i64 (bitcast v4i16:x))) case? Shouldn't the extracted big-endian index then be 3?
I agree, I'll update the patch.
https://reviews.llvm.org/D34990
More information about the llvm-commits
mailing list