[llvm-commits] Patch to safely restore optimization to testcase from PR3225 on x86

Dan Gohman gohman at apple.com
Thu Dec 18 17:31:13 PST 2008


 > +  if (KnownZero == VTBits) {

If the shift count is known to be all-zero, shouldn't it
have been simplified already by pre-legalize DAGCombine,
if not InstCombine?

Dan

On Dec 16, 2008, at 9:40 PM, Eli Friedman wrote:

> A little while ago, I committed a patch for PR3225 which disables a
> dangerous optimization for expanding double-width shifts (e.g. 64-bit
> shifts on x86).  This significantly pessimized the code generated on
> x86 for the cases which the optimization covered.
>
> The attached performs a similar optimization in x86 platform-specific
> code, which significantly improves code quality for the cases it
> covers; this version is safe because SHLD/SHRD do the right thing for
> shifts with a zero amount.
>
> Any comments?
>
> -Eli
> <x.txt>_______________________________________________
> 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