[llvm-commits] [llvm] r48356 - /llvm/trunk/lib/Target/X86/README.txt

Evan Cheng evan.cheng at apple.com
Tue Mar 18 10:15:38 PDT 2008


On Mar 18, 2008, at 10:13 AM, Evan Cheng wrote:

>>
>> You are correct, for now. I was thinking of the future when there  
>> may be other xforms that the function would need to handle! But we  
>> can cross that bridge when we come to it.
>>
>>> It's just a matter of style, but checking TruncVT is not MVT::isVoid
>>> seems weird to me.
>>
>> It is. What would you suggest if I needed to not exit early, say  
>> because of other xforms that follow?
>
> Not sure! :-) We'll worry about it in the future!

Actually... You can always move the transform into a separate function  
to take advantage of early exit.

Evan

>
> Evan
>
>> --
>> Chris
>>
>>>> _test:
>>>> 	srwi r2, r3, 16
>>>> 	extsb r3, r2
>>>> 	blr
>>>>
>>>> instead of:
>>>>
>>>> _test2:
>>>> 	slwi r2, r3, 8
>>>> 	srawi r3, r2, 24
>>>> 	blr
>>>>
>>>> On X86, this is a win because sextinreg (aka movsbl and friends)  
>>>> are
>>>> 3-
>>>> address, but sar is 2-address, giving:
>>>>
>>>> _test:
>>>> 	shrl	$16, %edi
>>>> 	movsbl	%dil, %eax
>>>> 	ret
>>>>
>>>> instead of:
>>>>
>>>> _test2:
>>>> 	shll	$8, %edi
>>>> 	movl	%edi, %eax
>>>> 	sarl	$24, %eax
>>>> 	ret
>>>>
>>>> What do you think?
>>>>
>>>> -Chris
>>>>
>>>> _______________________________________________
>>>> llvm-commits mailing list
>>>> llvm-commits at cs.uiuc.edu
>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>> --
>> Christopher Lamb
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080318/53138650/attachment.html>


More information about the llvm-commits mailing list