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

Duncan Sands baldrick at free.fr
Thu Mar 21 09:43:50 PDT 2013


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.




More information about the llvm-commits mailing list