[llvm-commits] [patch] minor instcombine+bitcast improvement
Chris Lattner
clattner at apple.com
Fri Apr 6 10:45:19 PDT 2007
On Apr 6, 2007, at 9:01 AM, Dan Gohman wrote:
> This patch makes instcombine convert this:
>
> %t = getelementptr float* cast ([2 x i32]* %str to float*),
> i32 %V
>
> into this:
>
> %t = getelementptr float* cast ([2 x i32]* %str to [2 x float]
> *), i32 0, i32 %V
>
> instead of this:
>
> %s = getelementptr [2 x i32]* %str, i32 0, i32 %V
> %t = bitcast i32* %s to float*
>
> I'm not yet familiar with instcombine's canonicalization style; is
> this
> a desireable change? It doesn't cause any regressions for me.
I don't have a strong preference either way. Is there a reason that
you prefer this style to the previous one?
-Chris
More information about the llvm-commits
mailing list