This fixes over estimating code size. This was broken by
79f52af4cd9a76485dd50bcdbb5d393eb7a70103.
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Event Timeline
Comment Actions
On the other patch, you wrote "This change broke the handling of source modifiers. we're now treating any source modifier operand as a literal" You mean just the code size calculation is broken, right?
Can you please add test cases for GFX11, and something that emits fmamk/fmaak? Those were the motivating cases for the change.
Comment Actions
Turns out those are broken. I think the API makes less sense now. "isInlineConstant" only makes sense for a vsrc operand and not an arbitary one. A counts-as-literal-use-something-in-any-operand would make more sense (inverted)
Comment Actions
This is causing:
$ cat r.ll define amdgpu_ps <2 x half> @f(half %arg) { bb: %i = fmul contract half %arg, 0xH3A66 %i1 = fadd contract half %i, 0xH2E66 %i2 = fmul contract half %arg, 0xH0000 %i3 = fsub contract half 0xH3A66, %i2 %i4 = insertelement <2 x half> poison, half %i1, i32 0 %i5 = insertelement <2 x half> %i4, half %i3, i32 1 ret <2 x half> %i5 } $ llc -march=amdgcn -mcpu=gfx1010 -o /dev/null r.ll error: Illegal instruction detected: VOP2/VOP3 instruction uses more than one literal renamable $vgpr1 = contract nofpexcept V_FMAAK_F16 14950, $vgpr0, 11878, implicit $mode, implicit $exec
Can you please fix or revert?