[llvm-commits] PATCH: Initial patches for changing the semantics of llvm.cttz and llvm.ctlz
Sandeep Patel
deeppatel1987 at gmail.com
Mon Dec 5 13:06:21 PST 2011
On Sat, Dec 3, 2011 at 6:24 AM, Owen Anderson <resistor at mac.com> wrote:
>
> On Dec 1, 2011, at 3:06 PM, Chris Lattner wrote:
>
>>
>> On Dec 1, 2011, at 11:20 AM, Dan Gohman wrote:
>>
>>> On Dec 1, 2011, at 2:47 AM, Chandler Carruth wrote:
>>>>
>>>> 7) remove all support (other than auto-upgrade) for the old intrinsics
>>>
>>> The "old" semantics really are more desirable though, in general. The only
>>> reason I know of for the "new" semantics is to cater to x86's old bsf and
>>> bsr instructions. But x86 admits its own deficiency, and has since introduced
>>> the lzcnt and tzcnt instructions, which behave properly. It seems unfortunate
>>> to require people who want the sane semantics to use a branch (even if
>>> CodeGen is clever and can eliminate it).
>>
>> I would be fine with keeping the existing intrinsics and adding two new ones with gcc-compatible semantics.
>
> What's the point of having two? Would any frontend actually generate the non-GCC compatible ones?
It seems likely that intrinsics will be desired to choose a particular
instruction on known hardware or in a CPUID-protected code path.
deep
More information about the llvm-commits
mailing list