This is an archive of the discontinued LLVM Phabricator instance.

[X86][FP16] Do not generate VBROADCAST for fp16
ClosedPublic

Authored by pengfei on Jun 7 2023, 1:26 AM.

Details

Summary

We cannot lower VBROADCAST i16 under AVX1.

Fixes #63114

Diff Detail

Event Timeline

pengfei created this revision.Jun 7 2023, 1:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 7 2023, 1:26 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
pengfei requested review of this revision.Jun 7 2023, 1:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 7 2023, 1:26 AM
LuoYuanke added inline comments.Jun 7 2023, 2:00 AM
llvm/test/CodeGen/X86/vector-half-conversions.ll
942

vbroadcastss would access 32-bit memory and vpinsrw only access 16-bit memory?

pengfei added inline comments.Jun 7 2023, 3:06 AM
llvm/test/CodeGen/X86/vector-half-conversions.ll
942

The vbroadcastss is an optimization because the high 16-bit is undefined.
ptr %a0 is a <8 x i16> pointer, so we are free to access 32-bit memory without worrying about the size.

LuoYuanke accepted this revision.Jun 7 2023, 3:21 AM

LGTM.

This revision is now accepted and ready to land.Jun 7 2023, 3:21 AM
This revision was automatically updated to reflect the committed changes.