intel/fs: Correctly handle multiply of fsign with a source modifier
The other source of the multiply will be interpreted as a uint32_t
in an XOR
instruction. Any source modifiers with either not be interpreted at all or will be misinterpreted due to the differing types.
If the other operand of the multiplication has a source modifier, just emit an extra move to resolve the source modifiers.
The negation source modifier problem is difficult to reproduce due to an algebraic optimization that changes (-ab) to -(ab). However, changes in MR !1359 (merged) push the negations back down.
On Gen7+ it might be possible to do slightly better for an abs()
source modifier by using BFI2
as a glorified copysign()
.
On Gen8+ it might be possible to do slightly better for a neg()
source modifier by emitting (~a ^ b).
There were no shader-db changes on any Intel platform, so I think we can deal with that problem when it arises.
See also piglit!224 (merged).
Fixes: 06d2c116 ("intel/fs: Add a scale factor to emit_fsign")