Page MenuHomePhabricator

[x86] Adding support for some missing intrinsics: _castf32_u32, _castf64_u64, _castu32_f32, _castu64_f64
Needs ReviewPublic

Authored by yubing on Thu, Sep 5, 12:11 AM.

Details

Summary

Adding support for some missing intrinsics:
_castf32_u32, _castf64_u64, _castu32_f32, _castu64_f64

Diff Detail

Event Timeline

yubing created this revision.Thu, Sep 5, 12:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptThu, Sep 5, 12:11 AM
RKSimon added inline comments.Thu, Sep 5, 1:39 AM
clang/lib/Headers/ia32intrin.h
198

There's an unofficial agreement that new x86 intrinsics should have doxygen comments - someday we'll get around to adding them to the existing ones as well.....

207

Shouldn't the unsigned long long cases be hidden by x86_64 wrappers?

clang/test/CodeGen/miscellaneous-builtins.c
1

32-bit target tests?

32

newline please

Also, as its x86 specific miscellaneous-builtins.c should be called x86-builtins.c (or similar).

craig.topper added inline comments.Thu, Sep 5, 2:43 PM
clang/lib/Headers/ia32intrin.h
207

icc doesn't restrict this to 64-bit targets. On 64-bit targets it corresponds to movq, but on other targets we can just lower to a 64-bit store and two 32-bit loads in the worst case.

RKSimon added inline comments.Fri, Sep 6, 1:45 AM
clang/lib/Headers/ia32intrin.h
207

Thanks - in which case we should definitely add 32-bit triple tests