search for: replacevaluewith

Displaying 12 results from an estimated 12 matches for "replacevaluewith".

2012 Aug 31
0
[LLVMdev] Question regarding ReplaceValueWith and ReplaceNodeResults
On Fri, Aug 31, 2012 at 2:48 PM, Pranav Bhandarkar <pranavb at codeaurora.org> wrote: > Hi, > > I am defining Hexagons version of ReplaceNodeResults to change the a node of > the type > A: i8 = INTRINSIC_WO_CHAIN ... , ... , > > To > B: SIGN_EXTEND (A) > > After returning from my function, the type legalizer The type legalizer asked your target to replace an
2012 Aug 31
3
[LLVMdev] Question regarding ReplaceValueWith and ReplaceNodeResults
Hi, I am defining Hexagons version of ReplaceNodeResults to change the a node of the type A: i8 = INTRINSIC_WO_CHAIN ... , ... , To B: SIGN_EXTEND (A) After returning from my function, the type legalizer calss ReplaceValuesUsesWith to replace the uses of A with B. Unfortunately, it replaces the use of A in the new node B too. So the node now is B: SIGN_EXTEND(B) , which is clearly bad and the
2012 Sep 02
0
[LLVMdev] Question regarding ReplaceValueWith and ReplaceNodeResults
Hi Pranav, >> as well as what Eli said, ReplaceNodeResults requires (IIRC) the new node > to >> have the same type as the old node, which doesn't seem to be the case >> here. > > Are you sure ? I see ReplaceNodeResults being called from functions such as > CustomWidenLowerNode and CustomLowerNode. > In the former, we are clearly expecting a change in type,
2012 Sep 02
2
[LLVMdev] Question regarding ReplaceValueWith and ReplaceNodeResults
Hi Duncan, > as well as what Eli said, ReplaceNodeResults requires (IIRC) the new node to > have the same type as the old node, which doesn't seem to be the case > here. Are you sure ? I see ReplaceNodeResults being called from functions such as CustomWidenLowerNode and CustomLowerNode. In the former, we are clearly expecting a change in type, aren't we? Even in the latter,
2008 Aug 19
2
[LLVMdev] Type Legalizer - Load handling problem
...Type(0) && N->getNumValues() == 1 && > > "Invalid operand expansion"); > > > > LOAD node has two values but the assertion checks N->getNumValues() == 1 > > which is not letting us change load operation. > Besides the assert, the call to ReplaceValueWith(SDValue(N, 0), Res); also looks incorrect, because the back-end lowered load will return two values as well. - Sanjiv
2008 Aug 19
0
[LLVMdev] Type Legalizer - Load handling problem
...NumValues() == 1 && >> > "Invalid operand expansion"); >> > >> > LOAD node has two values but the assertion checks N->getNumValues() == 1 >> > which is not letting us change load operation. >> > Besides the assert, the call to > ReplaceValueWith(SDValue(N, 0), Res); > > also looks incorrect, because the back-end lowered load will return two > values as well. Oh, I see what you mean! Sorry, I missed the issue originally. Definitely looks like a bug. I think the correct solution is that if custom legalization returns a node, Repl...
2016 Jan 25
1
Return value from TargetLowering::LowerOperation?
...is t27: v2i64 = or t15, t26 so it's a bitcast from v2i64 to v4i32 that we don't want to do anything special with so we return the input SDValue which TargetLowering::LowerOperationWrapper returns back to DAGTypeLegalizer::CustomLowerNode and then we get the assert in DAGTypeLegalizer::ReplaceValueWith. Thanks, Mikael > > -Tom > >> So in some cases it's ok for LowerOperation to return the same SDValue >> it was called on, and sometimes it's not? >> >> Can anyone shed some light on this? >> > > > > >> Thanks, >> Mikael >&g...
2008 Aug 18
0
[LLVMdev] Type Legalizer - Load handling problem
On Mon, Aug 18, 2008 at 6:31 AM, <Sachin.Punyani at microchip.com> wrote: > assert(Res.getValueType() == N->getValueType(0) && N->getNumValues() == 1 && > "Invalid operand expansion"); > > LOAD node has two values but the assertion checks N->getNumValues() == 1 > which is not letting us change load operation. I don't really know the
2008 Aug 19
1
[LLVMdev] Type Legalizer - Load handling problem
...>>> > "Invalid operand expansion"); >>> > >>> > LOAD node has two values but the assertion checks N->getNumValues() == 1 >>> > which is not letting us change load operation. >>> >> Besides the assert, the call to >> ReplaceValueWith(SDValue(N, 0), Res); >> >> also looks incorrect, because the back-end lowered load will return two >> values as well. > > Oh, I see what you mean! Sorry, I missed the issue originally. > Definitely looks like a bug. I think the correct solution is that if > custom le...
2008 Aug 18
5
[LLVMdev] Type Legalizer - Load handling problem
Hi All, I have some doubt in LLVM Type Legalizer. How will LOAD:i8 with an i16 operand be lowered in type legalizer? (i16 type is not legal for our target) Following assertion in function ExpandIntegerOperand (file LegalizeIntegerTypes.cpp) is not allowing us to change LOAD node. assert(Res.getValueType() == N->getValueType(0) && N->getNumValues() == 1 &&
2016 Jan 22
3
Return value from TargetLowering::LowerOperation?
Hi, I'm a litle bit puzzled by the TargetLowering::LowerOperation function, and what different callers of this function assumes about the returned value. In several places it seems like it is assumed that LowerOperation can return three kinds of values: * Something completely new. * SDValue() * The same SDValue as LowerOperation was called on. However in some places, e.g. in
2014 Mar 07
3
[LLVMdev] [RFC] Add second "failure" AtomicOrdering to cmpxchg instruction
...N->getBasePtr(), Op2, Op3, + N->getMemOperand(), N->getSuccessOrdering(), + N->getFailureOrdering(), N->getSynchScope()); // Legalized the chain result - switch anything that used the old chain to // use the new one. ReplaceValueWith(SDValue(N, 1), Res.getValue(1)); @@ -2448,6 +2448,7 @@ void DAGTypeLegalizer::ExpandIntRes_ATOMIC_LOAD(SDNode *N, N->getOperand(1), Zero, Zero, cast<AtomicSDNode>(N)->getMemOperand(), cast&lt...