This is an archive of the discontinued LLVM Phabricator instance.

[X86] Set all bits of zmm register to 1 before fp_to_int when target only supports avx512dq
AbandonedPublic

Authored by LiuChen3 on Dec 24 2019, 9:00 PM.

Details

Summary

v2f64->v2i64 and v4f64->v4i64 may raise unexpected exceptions when target only support avx512dq because the high bit of zmm register is undef.
This patch will clear zmm register before doing strict_fp_to_int.

Diff Detail

Event Timeline

LiuChen3 created this revision.Dec 24 2019, 9:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 24 2019, 9:00 PM
LiuChen3 marked an inline comment as done.Dec 24 2019, 9:04 PM
LiuChen3 added inline comments.
llvm/test/CodeGen/X86/vector-constrained-fp-intrinsics.ll
4213

VEX.128 and EVEX.128 will zero upper bits (MAXVL-1:128) of the corresponding ZMM register.

I don't think this is the right way to do this. Let me do some investigation.

LiuChen3 abandoned this revision.Dec 25 2019, 4:57 PM