[llvm-commits] [patch][pr12251] Use the range metadata in computeMaskedBits and add an optimization to InstructionSimplify.

Chris Lattner clattner at apple.com
Sat Mar 24 21:48:13 PDT 2012


On Mar 23, 2012, at 7:56 PM, Rafael EspĂ­ndola wrote:

> With the attached patch we compile

Looks great to me, please commit!

> And the assembly changes from
> 
> 	movb	(%rdi), %al
> 	andb	$1, %al
> 	ret
> 
> To
> 
> 	cmpb	$0, (%rdi)
> 	setne	%al
> 	ret
> 
> Not sure if the assembly change is an improvement, so maybe this patch
> should go in with a change to return i8, but I am sending it for
> review first.

The change is the right thing to do.  It's not clear to me which one is better, but llc now has enough information to continue generating the former if it is actually better.

-Chris



More information about the llvm-commits mailing list