[PATCH] InstCombine: Improve the result bitvect type when folding (cmp pred (load (gep GV, i)) C) to a bit test.

Arnaud A. de Grandmaison arnaud.adegm at gmail.com
Fri Mar 22 01:32:06 PDT 2013


Committed as r177712 on behalf of Ahmed.

Thanks Duncan for the review.
--
Arnaud

On 03/21/2013 05:43 PM, Duncan Sands wrote:
> Hi Ahmed,
>
>> The cast was implicitly added as InstCombine casts the getelementptr's
>> operands to the DataLayout pointer type (here i64). I originally added
>> the cast-aware part because it avoided introducing pointer-sized
>> arithmetic when keeping the index type is enough, but I'm not sure
>> what's the best thing to do here.
>> Anyway, I updated the patch to no longer take into account casted
>> indices (among the other fixes, sorry for the hastiness!).
>> Also, I replaced the testcase with a cleaner one, next to its i32
>> equivalent.
>
> thanks - LGTM.
>
> Ciao, Duncan.
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


-- 
Arnaud A. de Grandmaison




More information about the llvm-commits mailing list