Displaying 20 results from an estimated 42 matches for "type_s32".
Did you mean:
type_f32
2014 May 18
1
[PATCH 1/2] nv50/ir: fix s32 x s32 -> high s32 multiply logic
...form an unsigned multiply.
static bool
expandIntegerMUL(BuildUtil *bld, Instruction *mul)
{
const bool highResult = mul->subOp == NV50_IR_SUBOP_MUL_HIGH;
- DataType fTy = mul->sType; // full type
- DataType hTy;
+ DataType fTy; // full type
+ switch (mul->sType) {
+ case TYPE_S32: fTy = TYPE_U32; break;
+ case TYPE_S64: fTy = TYPE_U64; break;
+ default: fTy = mul->sType; break;
+ }
+
+ DataType hTy; // half type
switch (fTy) {
- case TYPE_S32: hTy = TYPE_S16; break;
case TYPE_U32: hTy = TYPE_U16; break;
case TYPE_U64: hTy = TYPE_U32; break;
- case...
2014 May 29
2
[PATCH 2/4] nvc0/ir: Handle reverse subop for OP_EXTBF when folding constant expressions
...58092f4..93f7c2a 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -529,8 +529,18 @@ ConstantFolding::expr(Instruction *i,
lshift = 32 - width - offset;
}
switch (i->dType) {
- case TYPE_S32: res.data.s32 = (a->data.s32 << lshift) >> rshift; break;
- case TYPE_U32: res.data.u32 = (a->data.u32 << lshift) >> rshift; break;
+ case TYPE_S32: {
+ res.data.s32 = (res.data.s32 << lshift) >> rshift;
+ if (i->subOp == NV50_I...
2016 Sep 27
2
[PATCH] nv50/ir: constant fold OP_SPLIT
...ion *newi = i;
switch (i->op) {
+ case OP_SPLIT: {
+ uint16_t shift = 0;
+ DataType type = TYPE_NONE;
+ bld.setPosition(i, false);
+ if (i->sType == TYPE_U64 || i->sType == TYPE_S64) {
+ shift = 32;
+ type = (i->sType == TYPE_U64) ? TYPE_U32 : TYPE_S32;
+ }
+ if (i->sType == TYPE_U32 || i->sType == TYPE_S32) {
+ shift = 16;
+ type = (i->sType == TYPE_U32) ? TYPE_U16 : TYPE_S16;
+ }
+ if (i->sType == TYPE_U16 || i->sType == TYPE_S16) {
+ shift = 8;
+ type = (i->sType == TYPE_U16...
2015 Jan 05
0
[PATCH] nv50/ir: change the way float face is returned
...def, addr, NULL);
if (i->dType == TYPE_F32) {
- bld.mkOp2(OP_AND, TYPE_U32, def, def, bld.mkImm(0x80000000));
- bld.mkOp2(OP_XOR, TYPE_U32, def, def, bld.mkImm(0xbf800000));
+ bld.mkOp2(OP_OR, TYPE_U32, def, def, bld.mkImm(0x00000001));
+ bld.mkOp1(OP_NEG, TYPE_S32, def, def);
+ bld.mkCvt(OP_CVT, TYPE_F32, def, TYPE_S32, def);
}
break;
case SV_NCTAID:
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
index ff48e94..04cd19e 100644
--- a/src/galliu...
2014 Jun 03
8
[PATCH v2 0/4] Constant folding of new Instructions
And another try for constant folding of Instructions for nvc0.
Please Review this!
Thanks,
Tobias Klausmann
Tobias Klausmann (4):
nvc0/ir: clear subop when folding constant expressions
nvc0/ir: Handle reverse subop for OP_EXTBF when folding constant
expressions
nvc0/ir: Handle OP_BFIND when folding constant expressions
nvc0/ir: Handle OP_POPCNT when folding constant expressions
2014 May 29
4
Add constant folding for new opcodes
Hi,
please review the following 4 patches:
1b1cfc6 nvc0/ir: Handle OP_BFIND when folding constant expressions
d2d2727 nvc0/ir: Handle OP_POPCNT when folding constant expressions
86a1ee6 nvc0/ir: Handle reverse subop for OP_EXTBF when folding constant
expressions
84563bf nvc0/ir: clear subop when folding constant expressions
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 39
2014 May 29
1
[PATCH 2/4] nvc0/ir: Handle reverse subop for OP_EXTBF when folding constant expressions
.../codegen/nv50_ir_peephole.cpp
>> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
>> @@ -529,8 +529,18 @@ ConstantFolding::expr(Instruction *i,
>> lshift = 32 - width - offset;
>> }
>> switch (i->dType) {
>> - case TYPE_S32: res.data.s32 = (a->data.s32 << lshift) >> rshift; break;
>> - case TYPE_U32: res.data.u32 = (a->data.u32 << lshift) >> rshift; break;
>> + case TYPE_S32: {
>> + res.data.s32 = (res.data.s32 << lshift) >> rshift;
>>...
2015 Jan 09
3
[RESEND/PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...6_MIN,
+ INT16_MAX));
+ else
+ res.data.s16 = util_iround(imm0.reg.data.f64);
+ break;
+ default:
+ return;
+ }
+ i->setSrc(0, bld.mkImm(res.data.s16));
+ break;
+ case TYPE_S32:
+ switch (i->sType) {
+ case TYPE_F32:
+ if (i->saturate)
+ res.data.s32 = util_iround(CLAMP(imm0.reg.data.f32, INT32_MIN,
+ INT32_MAX));
+ else
+ res.data.s32 = util_iround(imm0.r...
2014 Jul 05
1
[PATCH v4] nv50/ir: Handle OP_CVT when folding constant expressions
...ound(imm0.reg.data.f64), INT16_MIN,
+ INT16_MAX);
+ else res.data.s16 = util_iround(imm0.reg.data.f64);
+ break;
+ default:
+ return;
+ }
+ i->setSrc(0, bld.mkImm(res.data.s16));
+ break;
+ case TYPE_S32:
+ switch (i->sType) {
+ case TYPE_F32:
+ if (i->saturate)
+ res.data.s32 = CLAMP(util_iround(imm0.reg.data.f32), INT32_MIN,
+ INT32_MAX);
+ else res.data.s32 = util_iround(imm0.reg.data.f32);
+...
2015 Jan 10
2
[PATCH v2] nv50/ir: Handle OP_CVT when folding constant expressions
...IN,
+ INT16_MAX));
+ else
+ res.data.s16 = util_iround(imm0.reg.data.f32);
+ break;
+ default:
+ return;
+ }
+ i->setSrc(0, bld.mkImm(res.data.s16));
+ break;
+ case TYPE_S32:
+ switch (i->sType) {
+ case TYPE_F32:
+ if (i->saturate)
+ res.data.s32 = util_iround(CLAMP(imm0.reg.data.f32, INT32_MIN,
+ INT32_MAX));
+ else
+ res.data.s32 = util_iround(imm0.r...
2016 Sep 30
2
[PATCH] nv50/ir: constant fold OP_SPLIT
...PLIT: {
>> + uint16_t shift = 0;
>> + DataType type = TYPE_NONE;
>> + bld.setPosition(i, false);
>> + if (i->sType == TYPE_U64 || i->sType == TYPE_S64) {
>> + shift = 32;
>> + type = (i->sType == TYPE_U64) ? TYPE_U32 : TYPE_S32;
>> + }
>> + if (i->sType == TYPE_U32 || i->sType == TYPE_S32) {
>> + shift = 16;
>> + type = (i->sType == TYPE_U32) ? TYPE_U16 : TYPE_S16;
>> + }
>> + if (i->sType == TYPE_U16 || i->sType == TYPE_S16) {
>>...
2014 Jul 03
0
[PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...sType) {
+ case TYPE_F32: res.data.s16 = util_iround(imm0.reg.data.f32); break;
+ case TYPE_F64: res.data.s16 = util_iround(imm0.reg.data.f64); break;
+ default:
+ return;
+ }
+ i->setSrc(0, bld.mkImm(res.data.s16));
+ break;
+ case TYPE_S32:
+ switch (i->sType) {
+ case TYPE_F32: res.data.s32 = util_iround(imm0.reg.data.f32); break;
+ case TYPE_F64: res.data.s32 = util_iround(imm0.reg.data.f64); break;
+ default:
+ return;
+ }
+ i->setSrc(0, bld.mkImm(res.data.s32));
+...
2014 Jul 06
0
[PATCH v5] nv50/ir: Handle OP_CVT when folding constant expressions
...6_MIN,
+ INT16_MAX));
+ else
+ res.data.s16 = util_iround(imm0.reg.data.f64);
+ break;
+ default:
+ return;
+ }
+ i->setSrc(0, bld.mkImm(res.data.s16));
+ break;
+ case TYPE_S32:
+ switch (i->sType) {
+ case TYPE_F32:
+ if (i->saturate)
+ res.data.s32 = util_iround(CLAMP(imm0.reg.data.f32, INT32_MIN,
+ INT32_MAX));
+ else
+ res.data.s32 = util_iround(imm0.r...
2014 Jul 03
1
[PATCH v3 1/2] nv50/ir: Add support for the double Type to BuildUtil
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
---
.../drivers/nouveau/codegen/nv50_ir_build_util.cpp | 17 +++++++++++++++++
.../drivers/nouveau/codegen/nv50_ir_build_util.h | 2 ++
2 files changed, 19 insertions(+)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_build_util.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_build_util.cpp
2014 Jun 03
6
[PATCH v3 0/4] Constant folding of new Instructions
Yet another try for constant folding of Instructions for nvc0.
Please Review this again! (Hopefully the last time ;-) )
Tobias Klausmann (4):
nvc0/ir: clear subop when folding constant expressions
nvc0/ir: Handle reverse subop for OP_EXTBF when folding constant
expressions
nvc0/ir: Handle OP_BFIND when folding constant expressions
nvc0/ir: Handle OP_POPCNT when folding constant
2015 May 09
2
[PATCH 3/4] nvc0/ir: optimize set & 1.0 to produce boolean-float sets
...t; --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp
> @@ -413,6 +413,8 @@ TargetNV50::isOpSupported(operation op, DataType ty) const
> return false;
> case OP_SAD:
> return ty == TYPE_S32;
> + case OP_SET:
> + return !isFloatType(ty);
> default:
> return true;
> }
2016 Sep 28
0
[PATCH] nv50/ir: constant fold OP_SPLIT
...op) {
> + case OP_SPLIT: {
> + uint16_t shift = 0;
> + DataType type = TYPE_NONE;
> + bld.setPosition(i, false);
> + if (i->sType == TYPE_U64 || i->sType == TYPE_S64) {
> + shift = 32;
> + type = (i->sType == TYPE_U64) ? TYPE_U32 : TYPE_S32;
> + }
> + if (i->sType == TYPE_U32 || i->sType == TYPE_S32) {
> + shift = 16;
> + type = (i->sType == TYPE_U32) ? TYPE_U16 : TYPE_S16;
> + }
> + if (i->sType == TYPE_U16 || i->sType == TYPE_S16) {
> + shift = 8;
> +...
2016 Sep 30
0
[PATCH] nv50/ir: constant fold OP_SPLIT
...uint16_t shift = 0;
>>> + DataType type = TYPE_NONE;
>>> + bld.setPosition(i, false);
>>> + if (i->sType == TYPE_U64 || i->sType == TYPE_S64) {
>>> + shift = 32;
>>> + type = (i->sType == TYPE_U64) ? TYPE_U32 : TYPE_S32;
>>> + }
>>> + if (i->sType == TYPE_U32 || i->sType == TYPE_S32) {
>>> + shift = 16;
>>> + type = (i->sType == TYPE_U32) ? TYPE_U16 : TYPE_S16;
>>> + }
>>> + if (i->sType == TYPE_U16 || i->sType...
2014 May 06
1
[PATCH] nv50/ir/gk110: fix set with f32 dest
...p
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
@@ -915,6 +915,9 @@ CodeEmitterGK110::emitSET(const CmpInstruction *i)
modNegAbsF32_3b(i, 1);
}
FTZ_(3a);
+
+ if (i->dType == TYPE_F32)
+ code[1] |= 1 << 23;
}
if (i->sType == TYPE_S32)
code[1] |= 1 << 19;
--
1.8.3.2
2014 May 29
1
[PATCH 3/4] nvc0/ir: Handle OP_POPCNT when folding constant expressions
...f7c2a..68b9a6d 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -546,6 +546,16 @@ ConstantFolding::expr(Instruction *i,
}
break;
}
+ case OP_POPCNT: {
+ switch (i->dType) {
+ case TYPE_S32:
+ case TYPE_U32:
+ res.data.u32 = util_bitcount(a->data.u32 & b->data.u32); break;
+ default:
+ return;
+ }
+ break;
+ }
default:
return;
}
--
1.8.4.5