Displaying 8 results from an estimated 8 matches for "issignedtype".
2016 Sep 30
2
[PATCH v2] nv50/ir: constant fold OP_SPLIT
...@@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
Instruction *newi = i;
switch (i->op) {
+ case OP_SPLIT: {
+ uint8_t size = typeSizeof(i->dType);
+ DataType type = typeOfSize(size / 2, isFloatType(i->dType),
+ isSignedType(i->dType));
+ if (likely(type != TYPE_NONE)) {
+ uint64_t val = imm0.reg.data.u64;
+ uint16_t shift = size * 8;
+ bld.setPosition(i, false);
+ for (int8_t d = 0; i->defExists(d); ++d) {
+ bld.mkMov(i->getDef(d), bld.mkImm(val & ((1 <&l...
2014 May 18
1
[PATCH 1/2] nv50/ir: fix s32 x s32 -> high s32 multiply logic
...MUL(BuildUtil *bld, Instruction *mul)
bld->setPosition(mul, true);
+ Value *s[2];
Value *a[2], *b[2];
- Value *c[2];
Value *t[4];
for (int j = 0; j < 4; ++j)
t[j] = bld->getSSA(fullSize);
+ s[0] = mul->getSrc(0);
+ s[1] = mul->getSrc(1);
+
+ if (isSignedType(mul->sType)) {
+ s[0] = bld->getSSA(fullSize);
+ s[1] = bld->getSSA(fullSize);
+ bld->mkOp1(OP_ABS, mul->sType, s[0], mul->getSrc(0));
+ bld->mkOp1(OP_ABS, mul->sType, s[1], mul->getSrc(1));
+ }
+
// split sources into halves
- i[0] = bld->m...
2016 Sep 30
2
[PATCH] nv50/ir: constant fold OP_SPLIT
On 28.09.2016 02:01, Ilia Mirkin wrote:
> On Tue, Sep 27, 2016 at 7:25 PM, Tobias Klausmann
> <tobias.johannes.klausmann at mni.thm.de> wrote:
>> Split the source immediate value into two new values and create OP_MOV
>> instructions the two newly created values.
>>
>> Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
>> ---
2015 Aug 19
5
[PATCH 1/2] nvc0/ir: detect AND/SHR pairs and convert into EXTBF
Some shaders appear to extract bits using shift/and combos. Detect
(some) of those and convert to EXTBF instead.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
.../drivers/nouveau/codegen/nv50_ir_peephole.cpp | 66 +++++++++++++++-------
1 file changed, 46 insertions(+), 20 deletions(-)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
2016 Sep 30
0
[PATCH] nv50/ir: constant fold OP_SPLIT
...; Well with this you'd not set the new type right: bld.mkMov(def, val,
>>>type<<), where you always would use TYPE_U32. Not sure if that is what we
> want... other than that that, shorten it like this would be nice!
pah-shaw :(
typeOfSize(shift / 2, isFloatType(i->dType), isSignedType(i->dType))
How's that :p
>
>
>>
>>> + delete_Instruction(prog, i);
>>> + }
>>> + }
>>> + break;
>>> case OP_MUL:
>>> if (i->dType == TYPE_F32)
>>> tryCollapseChainedMULs(i...
2016 Sep 30
0
[PATCH v2] nv50/ir: constant fold OP_SPLIT
...tion *i, ImmediateValue &imm0, int s)
> Instruction *newi = i;
>
> switch (i->op) {
> + case OP_SPLIT: {
> + uint8_t size = typeSizeof(i->dType);
> + DataType type = typeOfSize(size / 2, isFloatType(i->dType),
> + isSignedType(i->dType));
Er wait, sorry, I might have confused matters here...
Why do you need to compute type at all? Why not just reuse i->dType?
> + if (likely(type != TYPE_NONE)) {
> + uint64_t val = imm0.reg.data.u64;
> + uint16_t shift = size * 8;
> + bld....
2015 May 09
5
[PATCH 1/4] nvc0/ir: avoid jumping to a sched instruction
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
Pretty sure there's nothing wrong with it, but it looks odd in the code.
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 2 ++
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 7 +++++--
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 2 ++
3 files changed, 9 insertions(+), 2 deletions(-)
2015 Feb 20
10
[PATCH 01/11] nvc0/ir: add emission of dadd/dmul/dmad opcodes, fix minmax
...tz);
+ emitNegAbs12(i);
+ if (i->op == OP_SUB)
+ code[0] ^= 1 << 8;
+}
+
+void
CodeEmitterNVC0::emitUADD(const Instruction *i)
{
uint32_t addOp = 0;
@@ -895,6 +947,8 @@ CodeEmitterNVC0::emitMINMAX(const Instruction *i)
else
if (!isFloatType(i->dType))
op |= isSignedType(i->dType) ? 0x23 : 0x03;
+ if (i->dType == TYPE_F64)
+ op |= 0x01;
emitForm_A(i, op);
emitNegAbs12(i);
@@ -2242,20 +2296,26 @@ CodeEmitterNVC0::emitInstruction(Instruction *insn)
break;
case OP_ADD:
case OP_SUB:
- if (isFloatType(insn->dType))
+ if...