[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 23 22:03:43 PST 2020
MaskRay added a comment.
In D88712#2412874 <https://reviews.llvm.org/D88712#2412874>, @venkataramanan.kumar.llvm wrote:
> In D88712#2412366 <https://reviews.llvm.org/D88712#2412366>, @MaskRay wrote:
>
>> In D88712#2411841 <https://reviews.llvm.org/D88712#2411841>, @venkataramanan.kumar.llvm wrote:
>>
>>>
>>
>> For your example:
>>
>> extern double log (double) asm ("" "log_finite") __attribute__ ((nothrow));
>>
>> double mylog (double d) { return log(d); }
>>
>> The intention is to emit `log_finite`, no matter the `-ffast-math`. Both GCC and Clang (after this patch) emit `jmp log_finite`.
>>
>> The previous behavior (according to your comment, with an older glibc) was undesired. So I think the right suggestion is to upgrade glibc.
>
> Then there optimizations like vectorization, inst combine which works on the LLVM intrinsics. But they will be not happening now with log_finite calls.
> is it possible to add an option to disable this feature, in case anyone who wants to avail these optimization?
I lean toward not adding an option since newer glibc does not have the problem (and the new Clang behavior is consistent with GCC).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88712/new/
https://reviews.llvm.org/D88712
More information about the cfe-commits
mailing list