[llvm-commits] [llvm] r78082 - /llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp
Dan Gohman
gohman at apple.com
Wed Aug 5 09:21:48 PDT 2009
On Aug 4, 2009, at 10:59 AM, Sanjiv Gupta wrote:
> + SDValue ChainLo = Chain, ChainHi = Chain;
> + if (Chain.getOpcode() == ISD::TokenFactor) {
> + ChainLo = Chain.getOperand(0);
> + ChainHi = Chain.getOperand(1);
> + }
This is not correct. There's no guarantee that a Tokenfactor for
an i64 store will have 2 chains and that it will be safe to use
them in this way. In order to be correct, this code should
validate that the TokenFactor operands are actually the two
chains from a sufficiently-aligned non-volatile expanded load.
And actually, with that checking, this code could be useful in
the DAGCombiner pass, if you're interested. The DAGCombiner's
alias-analysis code is not currently enabled by default for a
variety of reasons, so it would be nice to catch common cases
like this. It would help several targets.
Dan
More information about the llvm-commits
mailing list