[Mesa-stable] [Mesa-dev] [PATCH 1/2] gm107/ir: make use of FADD32I for all immediates
Ilia Mirkin
imirkin at alum.mit.edu
Mon Jun 27 22:06:25 UTC 2016
On Mon, Jun 27, 2016 at 6:05 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Mon, Jun 27, 2016 at 6:04 PM, Samuel Pitoiset
> <samuel.pitoiset at gmail.com> wrote:
>>
>>
>> On 06/28/2016 12:02 AM, Ilia Mirkin wrote:
>>>
>>> This loses you saturation. Does the target account for this?
>>
>>
>> No saturate flag for FADD32I.
>
> That's not what I asked.
Specifically look at this code:
bool
TargetNVC0::isSatSupported(const Instruction *insn) const
{
if (insn->op == OP_CVT)
return true;
if (!(opInfo[insn->op].dstMods & NV50_IR_MOD_SAT))
return false;
if (insn->dType == TYPE_U32)
return (insn->op == OP_ADD) || (insn->op == OP_MAD);
// add f32 LIMM cannot saturate
if (insn->op == OP_ADD && insn->sType == TYPE_F32) {
if (insn->getSrc(1)->asImm() &&
insn->getSrc(1)->reg.data.u32 & 0xfff)
return false;
}
Note how it will say that sat is supported for SIMMs with FADD? So the
compiler will generate those ops, but then the emitter won't be able
to handle it.
More information about the mesa-stable
mailing list