Displaying 20 results from an estimated 1000 matches similar to: "Instruction selection problems due to SelectionDAGBuilder"
2017 Sep 14
2
Question about 'DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT'
Hi All,
I have a question about splitting 'EXTRACT_VECTOR_ELT' with 'v2i1'. I
have a llvm IR code snippet as following:
llvm IR code snippet:
for.body: ; preds = %entry,
%for.cond
%i.022 = phi i32 [ 0, %entry ], [ %inc, %for.cond ]
%0 = icmp ne <2 x i32> %vecinit1, <i32 0, i32 -23>
%1 = extractelement <2 x i1>
2017 Sep 15
2
Question about 'DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT'
> extends the elements to 8bit and stores them on stack.
Store is responsible for zero-extend. This is the policy...
- Elena
-----Original Message-----
From: jingu at codeplay.com [mailto:jingu at codeplay.com]
Sent: Friday, September 15, 2017 17:45
To: llvm-dev at lists.llvm.org; Demikhovsky, Elena <elena.demikhovsky at intel.com>; daniel_l_sanders at apple.com
Subject: Re: Question
2017 Sep 17
2
Question about 'DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT'
Please open a bugzilla ticket and attach your testcase. It will allow us to debug and fix the problem.
Thanks
- Elena
From: JinGu [mailto:jingu at codeplay.com]
Sent: Saturday, September 16, 2017 00:38
To: Demikhovsky, Elena <elena.demikhovsky at intel.com>; daniel_l_sanders at apple.com <daniel_l_sanders at apple.com>; Jon Chesterfield <jonathanchesterfield at
2016 Jun 28
2
Instruction selection problem with type i64 - mistaken as v8i64?
Hello.
I am writing a back end in which I combined the existing BPF LLVM back end with the
Mips MSA vector extensions (from the Mips back end)
I have encountered an error when compiling with llc: the instruction selector uses a
vector register instead of a scalar register with type i64 .
I have the following part of LLVM IR program:
vector.body.preheader:
2017 Sep 18
1
Question about 'DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT'
> so I think we need to use non-extending load for element size less than 8bit on "DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT" like this roughly.
> if (N->getOperand(0).getValueType().getVectorElementType().getSizeInBits() < 8) {
> return DAG.getLoad(N->getValueType(0), dl, Store, StackPtr, MachinePointerInfo());
> } else {
> return
2017 Oct 13
2
[SelectionDAG] Assertion due to MachineMemOperand flags difference.
Hello,
I've hit an assertion in SelectionDAG where we try to merge 2 loads
that have the same operands but their MMO flags differ. One is
dereferenceable and one is not. I'm not sure what the underlying issue
here is:
1) MDSDNode with the same operands should have the same flags set on
their respective MMO. The fact the flags differ when the
opcode,types,operands and address-space are
2018 Apr 09
2
A way to opt out of a dag combine?
Is there an established way of disabling a DAG combine on a per target
basis, where it appears to be detrimental to the generated code? Writing if
(!mytarget) in DAGCombiner.cpp works but tends to be erased by git merge
and generally doesn't look ideal. Writing the inverse transform in target
specific code doesn't work in this instance and in general creates an
infinite loop.
Guidance
2018 Jun 20
2
Node deletion during DAG Combination ?
Hi,
I'm trying to optimize the 'extract_vector_elt' for my SIMD microcontroller.
The idea is, during DAG combination, to merge load/extract sequence into an architecture specific node.
During Instruction Selection, this specific node will be target selected to an architecture specific instruction.
By 'combination of DAG nodes' I understand 'replacing a set of DAG nodes by
2016 Feb 04
2
llc gives Segmentation fault at instruction selection [was Re: Instruction selection gives "LLVM ERROR: Cannot select"]
Hello, Tim,
Thank you for your advice.
Indeed, the problem with "LLVM ERROR: Cannot select" was a false predicate that
should have been true. I solved the problem by simply making the C++ function implementing
the TableGen predicate used in my store instruction (very similar to the selectIntAddrMSA
predicate from the Mips back end) return true instead of false.
But
2016 Jul 29
2
Help with ISEL matching for an SDAG
I have the following selection DAG:
SelectionDAG has 9 nodes:
t0: ch = EntryToken
t2: i64,ch = CopyFromReg t0, Register:i64 %vreg0
t16: i32,ch = load<LD1[%ptr](tbaa=<0x10023c9f448>), anyext from i8> t0,
t2, undef:i64
t15: v16i8 = BUILD_VECTOR t16, t16, t16, t16, t16, t16, t16, t16, t16,
t16, t16, t16, t16, t16, t16, t16
t11: ch,glue = CopyToReg t0, Register:v16i8 %V2, t15
2016 Apr 29
3
Assert in TargetLoweringBase.cpp
This post is related to the following post
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098823.html
I'm still trying to compile a library with clang. But now I'm getting as
assert in
lib/CodeGen/TargetLoweringBase.cpp:1155: virtual llvm::EVT
llvm::TargetLoweringBase::getSetCCResultType(llvm::LLVMContext&, llvm::EVT)
const: Assertion `!VT.isVector() && "No default
2018 Apr 09
1
llvm-dev Digest, Vol 166, Issue 22
Hi Krzysztof,
Sure, please see below. DAG.dump.() before and after, annotated with what I
believe the DAG means.
I've spent some time debugging the method but it's proving difficult to
determine where the logic is misfiring. Disabling the entire combine causes
a lot of failing x86-64 tests - I may have to learn an upstream vector ISA
to make progress on this.
Thank you
>From your
2020 Jan 27
4
Limited use types in the back end
I am hoping that someone can offer advice on a somewhat unusual issue that
I am facing with the SDAG. Namely, I am trying to implement some custom
operations that do very specific things on multiple registers at a time.
The operations themselves will simply be intrinsics since there are no
equivalent operations in IR/SDAG. However, handling the types seems rather
tricky.
One approach I tried is
2018 Dec 17
4
In ISel, where Constant<0> comes from?
Hello, LLVM devs.
I'm compiling the following simple IR:
define dso_local i32 @main(i32 %argc, i8** %argv) {
entry:
%retval = alloca i32, align 4
%argc.addr = alloca i32, align 4
%argv.addr = alloca i8**, align 8
store i32 0, i32* %retval, align 4
store i32 %argc, i32* %argc.addr, align 4
store i8** %argv, i8*** %argv.addr, align 8
ret i32 0
}
using `llc -march=sparc
2017 Feb 14
2
Ensuring chain dependencies with expansion to libcalls
Hi all,
Our target does not have native support for 64-bit integers, so we rely on
library calls for certain operations (like sdiv). We recently ran into a
problem where these operations that are expanded to library calls aren't
maintaining the proper ordering in relation to other chains in the DAG.
The following snippet of a DAG demonstrates the problem.
t0: ch = EntryToken
t2:
2016 Jun 25
2
Question about VectorLegalizer::ExpandStore() with v4i1
Hi All,
I have a problem with VectorLegalizer::ExpandStore() with v4i1.
Let's see a example.
* LLVM IR
store <4 x i1> %edgeMask_for.body1314, <4 x i1>* %27
* SelectionDAG before vector legalization
ch = store<ST1[%16](align=4), trunc to v4i1> t0, t128, t32, undef:i64
* SelectionDAG after vector legalization
ch = store<ST1[%16](align=4), trunc to i1> t0, t133, t32,
2019 Feb 08
2
Unfolded additions of constants after promotion of @llvm.ctlz.i16 on SystemZ
Hi,
SystemZ supports @llvm.ctlz.i64() natively with a single instruction
(FLOGR), and lesser bitwidth versions of the intrinsic are promoted to i64.
For some reason, this leads to unfolded additions of constants as shown
below:
This function:
define i16 @fun(i16 %arg) {
%1 = tail call i16 @llvm.ctlz.i16(i16 %arg, i1 false)
ret i16 %1
}
,gives this optimized DAG as input to instruction
2019 Jan 22
4
_Float16 support
I'd like to start a discussion about how clang supports _Float16 for target architectures that don't have direct support for 16-bit floating point arithmetic.
The current clang language extensions documentation says, "If half-precision instructions are unavailable, values will be promoted to single-precision, similar to the semantics of __fp16 except that the results will be stored
2016 Jun 28
0
Question about VectorLegalizer::ExpandStore() with v4i1
Hi All,
Can someone comment below question whether it is wrong or not please?
2016-06-25 7:52 GMT+01:00 jingu kang <jaykang10 at gmail.com>:
> Hi All,
>
> I have a problem with VectorLegalizer::ExpandStore() with v4i1.
>
> Let's see a example.
>
> * LLVM IR
> store <4 x i1> %edgeMask_for.body1314, <4 x i1>* %27
>
> * SelectionDAG before vector
2016 Jun 29
0
Instruction selection problem with type i64 - mistaken as v8i64?
Hi,
I vaguely remember hitting something like this when I was implementing MSA. IIRC, there was an optimization (in DAGCombine or somewhere around there) that was folding CopyToReg instructions into the load without checking whether the new register class was acceptable. I remember adding a target hook to limit this optimization based on the EVT's involved but I'm not sure if that's