intel/compiler: Make decision based on source type instead of opcode
authorSagar Ghuge <sagar.ghuge@intel.com>
Thu, 8 Jul 2021 01:10:19 +0000 (18:10 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 16 Jul 2021 15:59:56 +0000 (15:59 +0000)
commitcde9ca616d7bd2ecdf3281f087e9c7acccc85192
tree4c437646458068aec3980f0f73e467573f15bfc3
parent705285b9f4a11b19c550ef3acbb40eb0a1d6bc41
intel/compiler: Make decision based on source type instead of opcode

This patch restructure code a little bit to check if source can be
represented as immediate operand. This is a foundation for next patch
which add checks for integer operand as well.

Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11596>
src/intel/compiler/brw_fs_combine_constants.cpp