HomePhabricator

[AMDGPU][GlobalISel] Avoid selecting S_PACK with constants

Authored by mbrkusanin on Jan 20 2021, 2:38 AM.

Description

[AMDGPU][GlobalISel] Avoid selecting S_PACK with constants

If constants are hidden behind G_ANYEXT we can treat them same way as G_SEXT.
For that purpose we extend getConstantVRegValWithLookThrough with option
to handle G_ANYEXT same way as G_SEXT.

Differential Revision: https://reviews.llvm.org/D92219