[LLVMdev] some superoptimizer results

John Regehr regehr at cs.utah.edu
Wed Jul 22 21:27:32 PDT 2015


> I just noticed: most of the results in this batch seem to be about exploiting `[zs]ext i1` having cost 1
> in order to replace a select of cost 3.
> Could you do a run where select has cost 1 and [zs]ext i1 (and trunc to i1) has cost 2 or 3?

I tried this (or something quite similar) earlier and it caused Souper to 
introduce *a lot* of selects.  So the problem is that Souper's preferences 
become skewed too far in the other direction.

How about for the next run I give everything (except maybe div/rem) cost 
1?  Then the only thing Souper will tell us about is when it can eliminate 
instructions, which seems to be a generally desirable thing.

As I said in the blog post, in the next batch Souper will exploit known 
bits.  I'm excited to see what kind of results come out of Philip's 
value-tracking-dom-conditions.

John



More information about the llvm-dev mailing list