[PATCH] D26785: InstCombine: Fold bitcast of vector to FP scalar
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 21 18:11:57 PST 2016
arsenm added inline comments.
================
Comment at: lib/Analysis/ConstantFolding.cpp:91-113
- // Now that we know that the input value is a vector of integers, just shift
- // and insert them into our result.
- unsigned BitShift = DL.getTypeSizeInBits(SrcEltTy);
- APInt Result(IT->getBitWidth(), 0);
- for (unsigned i = 0; i != NumSrcElts; ++i) {
- Constant *Element;
- if (DL.isLittleEndian())
----------------
majnemer wrote:
> Is splitting out this code into a function related to the correctness of the change? If not, I'd leave it alone.
It was re-used in an earlier version but then I merged the FP and int paths back. I can commit this refactor separately
https://reviews.llvm.org/D26785
More information about the llvm-commits
mailing list