Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Getting SELECT_CC and BR_CC DAG nodes"
2016 Mar 15
2
how to type-legalize a dag
On Tue, Mar 15, 2016 at 2:21 PM, Krzysztof Parzyszek via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> On 3/15/2016 4:16 PM, Rail Shafigulin via llvm-dev wrote:
>
>> Below is the output of llc with a -debug-only=isel. As you could see the
>> output type for load, store, and add changes from v4i32 to i32 during
>> legalization. How can I preserve the output type to
2014 Aug 01
2
[LLVMdev] BR_CC questions
I am implementing a new backend and am pretty sure I don't quite understand "the way" one is supposed to implement conditional branches.
My target CPU natively supports a conditional branch instruction that accepts a condition to test (equal, less than, etc.), two operands (two registers, or one register and one immediate), and finally a target PC to branch to if the comparison
2019 Jun 01
2
Optimizing Compare instruction selection
I attempt to optimize the use of the ‘CMP’ instruction on my architecture by removing the instruction instances where the Status Register already had the correct status flags.
The cmp instruction in my architecture is the typical one that compares two registers, or a register with an immediate, and sets the Status Flags accordingly. I implemented my ‘cmp’ instruction in LLVM by custom lowering
2019 Jun 02
2
Optimizing Compare instruction selection
Hi Eli,
Thank you very much for your response.
In fact, I had already tried the X86 approach before, i.e explicitly using the status register. This is the approach that appeals more to me. I left it parked because it also produced some problems (but I left it commented out). So I have now re-lived the code, and it works fine in most cases, but there’s a particular case that causes LLVM to stop
2019 Jun 05
2
Optimizing Compare instruction selection
Hi Eli,
Thanks again for your reply.
I am unsure about implementing the getCrossCopyRegClass for my target. My target does not support or allow moves to and from the SR. The SR exists because it has implicit involvement in some instructions, but it is opaque to the assembler and to the user as a register. I mean, there are no instructions to directly move or read it, or even access it directly.
2011 Nov 02
0
[LLVMdev] ifconversion following br_cc instructions
Hi,
I am trying to implement support for an if-conversion pass in a backend for the ADRES CGRA architecture.
>From studying the existing IfConversion pass, I observed the following:
- The PredicateInstruction method is meant to insert guards into conditional instructions.
- This method assumes that one will be able to get the predicate from the conditional branch instruction
on which
2012 Aug 19
1
[LLVMdev] MBlaze select_cc lowering question.
Can someone explain how the condition code is passed from the
MBlazeTargetLowering::LowerSELECT_CC to
MBlazeTargetLowering::EmitCustomSelect custom inserter? In
LowerSELECT_CC the condition code is never accessed (Op.GetOperand(4))
and I don't see how it ends up getting correctly passed to the
MBlazeTargetLowering::EmitCustomSelect.
> SDValue
2009 Mar 22
2
[LLVMdev] Implementing select_cc without cmov
Hi All,
I need to implement select_cc as a "cmp; mov rX,1; brcond cnd, END;
mov rX,0; END:" sequence.
Chris mentioned that the PPC code (as well as the x86 SSE code) does
this, but I can't seem to find it.
What I really need to kmow is how to insert the branch/label pair at
instruction selection phase.
Anyone have an example of this?
2006 Aug 21
5
[LLVMdev] selecting select_cc
I am trying to add support for select_cc. In ARM it can be implemented with:
mov $dst, $falseVal
cmp $a, $b
moveq $dst, $trueVal
My current strategy is to expand select_cc in two ARM nodes:
ARM::SELECT and ARM::CMP. The two nodes would be connected by a flag
edge.
ARM::CMP would then expand to "cmp $a, $b". This instruction has no
results. It only alters the CPSR (current program
2009 Mar 22
0
[LLVMdev] Implementing select_cc without cmov
someguy wrote:
> Hi All,
>
> I need to implement select_cc as a "cmp; mov rX,1; brcond cnd, END;
> mov rX,0; END:" sequence.
>
> Chris mentioned that the PPC code (as well as the x86 SSE code) does
> this, but I can't seem to find it.
>
> What I really need to kmow is how to insert the branch/label pair at
> instruction selection phase.
>
> Anyone
2017 Feb 25
2
Help understanding and lowering LLVM IDS conditional codes correctly
Note: Question is written after describing what I have coded.
Hello LLVMDevs,
I am trying to impliment floating point comparsion for an architecture which
supports following type of floating point comparision if FPU is available:
fcmp.un --> true if one of the operand is NaN
fcmp.lt --> ordered less than, if any input NaN then return false
fcmp.eq --> ordered equal, if any input NaN
2009 Dec 11
1
[LLVMdev] combine ISD::SETCC by custom routine
hi Eli,
thanks for reply :)
i am currently decompose the BR_CC node to a target SETCC node and a
target BRCOND node, but since BR_CC node sometimes is combine from a
BRCOND node and SETCC node, so i just wondering if theres any better
way :)
regards
--ether
2014 Oct 10
3
[LLVMdev] Stange behavior in fp arithmetics on x86 (bug possibly)
On Oct 7, 2014, at 2:26 PM, Tim Northover <t.p.northover at gmail.com> wrote:
> Hi Dmitry,
>
> On 7 October 2014 10:50, Dmitry Borisenkov <d.borisenkov at samsung.com> wrote:
>> fpfail.s:26: Error: invalid instruction suffix for `ret'
>>
>> I downloaded Intel manual and haven’t found any mention of retl instruction,
>
> "retl" is the
2009 Dec 11
0
[LLVMdev] combine ISD::SETCC by custom routine
On Fri, Dec 11, 2009 at 1:49 AM, ether zhhb <etherzhhb at gmail.com> wrote:
> hi,
>
> i have a backend that want to do custom combine on SETCC nodes.
>
> but some time SETCC was combined into BR_CC before i can visit it to
> do my own combine, because DAGCombiner always do its own combine
> before custom combine. so, is there anyway to prevent it being
> combined
2009 Jul 03
0
[LLVMdev] Inserting nodes into SelectionDAG (X86)
Thanks to your help I've actually made some progress... Especially the
SelectionDAGNodes.h was a good hint.
But there are still some things that I can't figure out:
// 'mov eax, 41'
Chain = DAG.getCopyToReg(Chain, DAG.getRegister(X86::EAX, MVT::i32),
DAG.getConstant(41, MVT::i32), InFlag);
InFlag = Chain.getValue(1);
// 'inc eax'
SDValue eaxVal =
2009 Dec 11
2
[LLVMdev] combine ISD::SETCC by custom routine
hi,
i have a backend that want to do custom combine on SETCC nodes.
but some time SETCC was combined into BR_CC before i can visit it to
do my own combine, because DAGCombiner always do its own combine
before custom combine. so, is there anyway to prevent it being
combined without changing the logic of DAGCombiner?
thank you very much
--ether
2014 Oct 07
4
[LLVMdev] Stange behavior in fp arithmetics on x86 (bug possibly)
Hello everyone.
I'm not an expert neither in llvm nor in x86 nor in IEEE standard for
floating point numbers, thus any of my following assumptions maybe wrong. If
so, I will be grateful if you clarify me what's goes wrong. But if my
guesses are correct we possibly have a bug in fp arithmetics on x86.
I have the following ir:
@g = constant i64 1
define i32 @main() {
%gval = load
2017 Mar 09
2
Help understanding and lowering LLVM IDS conditional codes correctly
On Thu, Mar 9, 2017 at 9:35 PM, Hal Finkel <hfinkel at anl.gov> wrote:
>
> On 02/25/2017 03:06 AM, vivek pandya via llvm-dev wrote:
>
> Note: Question is written after describing what I have coded.
>
> Hello LLVMDevs,
>
> I am trying to impliment floating point comparsion for an architecture
> which
> supports following type of floating point comparision if FPU
2017 Mar 14
2
Help understanding and lowering LLVM IDS conditional codes correctly
On 03/14/2017 07:16 AM, vivek pandya wrote:
> Hello Hal,
> setCondCodeAction(expand) for un ordered comparison generates
> semantically wrong code for me for example SETUNE gets converted to
> SETOE that causes infinite loops.
Can you please explain what is happening? It sounds like a bug we should
fix.
>
> What is ideal place where I can convert unordered comparison to un
2009 Mar 22
3
[LLVMdev] Flags/ConditionCode Model is broken
Hi all,
I've spent the day trying to understand setcc/select_cc intricacies,
and I thought I should mention that so far as I can tell, the modeling
of CPU flags, condition codes and therefore conditional instructions
seems pretty broken.
On the one hand there are the SDNPInFlag/SDNPOutFlag node properties
which allow you to mark an instruction as using or def-ing the CPU
flags