[PATCH] [InstCombine] Combine adjacent i8 loads.

Pasi Parviainen pasi.parviainen at iki.fi
Fri May 2 14:29:45 PDT 2014


This whole thing sounds awfully similar to situation described by 
PR6627, which was addressed within GVN. Which prevents some nice 
simplifications when doing the same processing for switch instructions 
as GVN::processFoldableCondBr does for branch instructions.

My favorite llvm based example case for this is following snippet:

#include "llvm/ADT/Twine.h"
using llvm::Twine;
void foo(const Twine &);
void bar(unsigned alfa, unsigned beta)
{
   foo("alfa = " + Twine(alfa) + "; beta = " + Twine(beta));
}

For which gcc can eliminate all the branches and conditional moves, llvm 
could get pretty close when disabling load widening within GVN and 
extending processing of foldable conditional branches to foldable 
switches (was either one or two branches left for x86_64, can't remember 
for sure, since it has been a while since I did the experiment).

Pasi.

On 2.5.2014 1:44, Michael Spencer wrote:
> Adding llvm-commits to CC.
>
> http://reviews.llvm.org/D3580
>
>
>
> _______________________________________________
> 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