aco/optimizer: ensure to not erase high bits when propagating packed constants
Packed constants with non-zero values in the high half might have been propagated as 16 bit, dropping the high half. Cc: mesa-stable Closes: #5070 Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11954>
This commit is contained in:
parent
66213ab2de
commit
9b1a296172
|
@ -194,7 +194,8 @@ struct ssa_info {
|
||||||
add_label(label_literal);
|
add_label(label_literal);
|
||||||
val = constant;
|
val = constant;
|
||||||
|
|
||||||
if (chip >= GFX8 && !op16.isLiteral())
|
/* check that no upper bits are lost in case of packed 16bit constants */
|
||||||
|
if (chip >= GFX8 && !op16.isLiteral() && op16.constantValue64() == constant)
|
||||||
add_label(label_constant_16bit);
|
add_label(label_constant_16bit);
|
||||||
|
|
||||||
if (!op32.isLiteral())
|
if (!op32.isLiteral())
|
||||||
|
|
Loading…
Reference in New Issue