[llvm-commits] [llvm] r139006 - in /llvm/trunk: lib/VMCore/ConstantFold.cpp test/Transforms/LoopUnroll/pr10813.ll
Jakub Staszak
kubastaszak at gmail.com
Fri Sep 2 09:22:25 PDT 2011
We return operand#0 for undef value, so I did it by analogy.
- Kuba
On Sep 2, 2011, at 6:09 PM, Duncan Sands wrote:
> Hi Jakub,
>
>> --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original)
>> +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Fri Sep 2 10:43:43 2011
>> @@ -761,6 +761,10 @@
>>
>> if (ConstantVector *CVal = dyn_cast<ConstantVector>(Val)) {
>> if (ConstantInt *CIdx = dyn_cast<ConstantInt>(Idx)) {
>> + uint64_t Index = CIdx->getZExtValue();
>> + if (Index>= CVal->getNumOperands())
>> + // ee({w,x,y,z}, wrong_value) -> w (an arbitrary value).
>> + return CVal->getOperand(0);
>
> why don't you return undef here?
>
> Ciao, Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list