This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Check values of constants in isKnownNeverNaN
ClosedPublic

Authored by Petar.Avramovic on Nov 18 2020, 8:27 AM.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2020, 8:27 AM
Petar.Avramovic requested review of this revision.Nov 18 2020, 8:27 AM
arsenm added inline comments.Nov 18 2020, 8:30 AM
llvm/lib/CodeGen/GlobalISel/Utils.cpp
490

Braces

494–499

Also G_BUILD_VECTOR_TRUNC

495

probably should be const&

llvm/lib/CodeGen/GlobalISel/Utils.cpp
494–499

I thought that G_BUILD_VECTOR_TRUNC and G_ANYEXT would have to be handled also but I don't have test for them. Might be required depending on order in with instructions are legalized (G_BUILD_VECTOR_TRUNC is not generated before legalizer). Should I add them anyway?

arsenm added inline comments.Nov 18 2020, 8:39 AM
llvm/lib/CodeGen/GlobalISel/Utils.cpp
494–499

Can be a separate patch

foad added inline comments.Nov 18 2020, 8:40 AM
llvm/lib/CodeGen/GlobalISel/Utils.cpp
494–499

What does G_BUILD_VECTOR_TRUNC do on floating point types? Is it like G_TRUNC or G_FPTRUNC?

arsenm added inline comments.Nov 18 2020, 8:41 AM
llvm/lib/CodeGen/GlobalISel/Utils.cpp
494–499

G_TRUNC, it's a bit discard only

arsenm accepted this revision.Nov 18 2020, 9:32 AM
This revision is now accepted and ready to land.Nov 18 2020, 9:32 AM