See bug 39319: https://bugs.llvm.org/show_bug.cgi?id=39319
Do we support different constants if one is literal and another one is inline constant?
s_and_b32 s2, 2, 1234
AFAIR gpu supports arbitrary number of inline constants.
This patch LGTM
Sure. Inline constants are free. The code in this patch only limits use of literals.