[LLVMdev] Fusing GEPIs

Duncan Sands baldrick at free.fr
Thu May 14 04:11:33 PDT 2009


> Is there any standard pass or something that can fuse chained GEPIs?
> 
> I.e. turning
> 	b = getelementptr a, 10, 1
> 	c = getelementptr b, 0, 3
> 	d = getelementptr c, 0, 5
> into:
> 	d = getelementptr a, 10, 1, 3, 5

I think instcombine does this.

Ciao,

Duncan.



More information about the llvm-dev mailing list