similar to: Wrong Range of SCEV for URem

Displaying 20 results from an estimated 400 matches similar to: "Wrong Range of SCEV for URem"

2019 Jun 30
2
Information Loss of Array Type in Function Interface in IR Generated by Clang
Dear David, Thanks for your prompt reply! Sure, I can implement a AST visitor to go through the AST to get the information but I just wonder whether there is any other way to let Clang do so. What I am considering is how to let the generated IR looks like below, which some tools realize: define dso_local i32 @_Z1fPii([51 x i32]* %A, i32 %x) local_unnamed_addr #0 !dbg !7 { entry: ...
2019 Jun 30
2
Information Loss of Array Type in Function Interface in IR Generated by Clang
Dear all, Hi! Recently, I notice a situation where I cannot infer the size of the outermost dimension of array in the function interface. To concretely depict the problem, I show the C source code and the generated IR code at the end. The array size of A[] is 51 but this information is lost in the generated IR. How can I maintain such information in IR? Should I set some argument for
2019 Jan 31
4
Confusing ERROR with LoopAccessLegacyAnalysis: Pass 'Unnamed pass: implement Pass::getPassName()' is not initialized.
Dear all, I write a new LoopPass which wants to use passes including LoopInfoWrapperPass, ScalarEvolutionWrapperPass and LoopAccessLegacyAnalysis. Therefore, I implement the following code based on LLVM 9.0.0: ===================================================================== bool LoopInformationCollect::runOnLoop(Loop *L, LPPassManager &) { auto &SE =
2019 Apr 15
2
Loop Strength Reduction Pass Does Not Work for Some Varialbles Related to Induction Variables
Dear Momchil, Thanks a lot for your prompt reply and kindly suggestion. The code will truly lead to some automatic unrolling with GCC and increase the number of operations in the assembly code. However, I am focus on the the IR optimization and the calculation of the array element offest, which may need multiplication if the IR instruction GEP is lowered to arithmetic operations. The
2019 Mar 31
2
Unable to find requested analysis info (Interesting Assertion Failture for Specific Target Source Code)
Dear all, Hi! I encounter an interesting assertion failure when implementing my Pass, which is defined with the member functions shown below: ======================My Pass====================================== bool MYPass::runOnModule(Module &M) { for (auto &F : M) { SE = &getAnalysis<ScalarEvolutionWrapperPass>(F).getSE(); ......
2019 Apr 15
2
Loop Strength Reduction Pass Does Not Work for Some Varialbles Related to Induction Variables
Dear all, Hi! Recently, I try to combine the passes SeparateConstOffsetFromGEP and LoopStrengthReduction to transform the multiplication in the lowered GEP IRs into addition. However, it seems LoopStrengthReduction is unable to remove all the multiplications for the element offset calculation. My test code is shown below and thanks a lot in advance for your time and suggestion!
2019 May 29
2
Problem of getNumOperands() for CallInst
Hi all, I got a interesting problem when calling getNumOperands() of CallInst. For example, call void @_Z2f2PA100_i([100 x i32]* nonnull %arraydecay) If I use getNumOperands(), it will return 2. However, if I use getCalledFunction()->getNumParams(), it will return 1. According to the IR, I think the number of operands of the call instruction should be 1. I
2019 Mar 04
2
Add Bitwidth Attribute in Clang without Modification in Source Code of Clang
I've actually got an implementation of this as an arbitrary precision integer extension that I've written up an RFC for (but not submitted). Below is my copy/pasted RFC (again, not reviewed, but I DO have an implementation of it that I need to prepare for review). I suspect my implementation will do what you need out of it. Its actually more significant than just adding a normal
2013 Nov 05
0
[LLVMdev] LICM and SCEV AA?
On 2 November 2013 05:59, Hal Finkel <hfinkel at anl.gov> wrote: > > I would be scared to enable SCEV AA because it's not well tested > > This seems like a solvable problem. SCEV AA itself is something like 30 > lines of non-boilerplate code, and essentially does one thing (calls > getMinusSCEV in both directions and uses getUnsignedRange on the result). > We should
2013 Nov 05
2
[LLVMdev] LICM and SCEV AA?
On Nov 5, 2013, at 11:42 AM, Renato Golin <renato.golin at linaro.org> wrote: > On 2 November 2013 05:59, Hal Finkel <hfinkel at anl.gov> wrote: > > I would be scared to enable SCEV AA because it's not well tested > > This seems like a solvable problem. SCEV AA itself is something like 30 lines of non-boilerplate code, and essentially does one thing (calls
2013 Nov 02
2
[LLVMdev] LICM and SCEV AA?
----- Original Message ----- > > On Oct 31, 2013, at 6:06 AM, Hal Finkel <hfinkel at anl.gov> wrote: > > > Hello, > > > > We currently generate suboptimal code for this loop: > > > > for (int i = 1; i < LEN; i++) { > > a[i] = a[0] + b[i]; > > } > > > > The largest problem is that we won't vectorize the loop because
2015 Jan 15
4
[LLVMdev] confusion w.r.t. scalar evolution and nuw
I've been doing some digging in this area (scev, wrapping arithmetic), learning as much as I can, and have reached a point where I'm fairly confused about the semantics of nuw in scalar evolution expressions. Consider the following program: define void @foo(i32 %begin) { entry: br label %loop loop: %idx = phi i32 [ %begin, %entry ], [ %idx.dec, %loop ] %idx.dec = sub nuw i32
2006 Apr 18
1
[patch] sparc build fix
add object rules so that the division, remainder and friends get really build on sparc, patch from Fabio M. Di Nitto <fabbione@ubuntu.com>. reworked to apply on latest git tree. Signed-off-by: maximilian attems <maks@sternwelten.at> --- Has been since long in the Debian and Ubuntu klibc. diff --git a/klibc/arch/sparc/Makefile.inc b/klibc/arch/sparc/Makefile.inc index
2012 Feb 27
0
[LLVMdev] How to unroll loop with non-constant boundary
On 27.02.2012, at 18:49, Eli Friedman wrote: > On Mon, Feb 27, 2012 at 9:30 AM, Benjamin Kramer > <benny.kra at googlemail.com> wrote: >> >> On 27.02.2012, at 17:13, Николай Лихогруд wrote: >> >>> Dear LLVM, >>> >>> Consider two loops with one interation - >>> First with constant lower bound, second with usual
2013 Nov 06
3
[LLVMdev] loop vectorizer
Good that you bring this up. I still have no solution to this vectorization problem. However, I can rewrite the code and insert a second loop which eliminates the 'urem' and 'div' instructions in the index calculations. In this case, the inner loop's trip count would be equal to the SIMD length and the loop vectorizer ignores the loop. Unrolling the loop and SLP is not an
2017 Jul 31
4
unsigned operations with negative numbers
Hello, I want to know, if I can always assume that when I do unsigned operations like udiv, urem I will get the both operands converted to unsigned values? with under optimized version of code I sometimes receive these lines: unsigned a = 123; int b = -2; int c = a / b; -> %1 = udiv i32 123, -2 and get the result 0. Will it always be zero? or is it undefined?
2008 Mar 31
3
[LLVMdev] Reference Manual Clarifications
Here are some clarifications for the reference manual. Please verify that my assumptions are correct. Shall I post a patch? Floating-point Constants: Add "The assembler requires the exact decimal value of a floating-point constant. For example, the assembler accepts '1.25' but rejects '1.3' because '1.3' is a repeating decimal in binary." Binary
2012 Feb 27
2
[LLVMdev] How to unroll loop with non-constant boundary
On Mon, Feb 27, 2012 at 9:30 AM, Benjamin Kramer <benny.kra at googlemail.com> wrote: > > On 27.02.2012, at 17:13, Николай Лихогруд wrote: > >> Dear LLVM, >> >>     Consider two loops with one interation - >>     First with constant lower bound, second with usual non-constant lower bound: >> >>     int main(int argc, char ** argv) >>     {
2013 Nov 06
0
[LLVMdev] loop vectorizer
On Oct 30, 2013, at 11:21 PM, Renato Golin <renato.golin at linaro.org> wrote: > On 30 October 2013 18:40, Frank Winter <fwinter at jlab.org> wrote: > const std::uint64_t ir0 = (i+0)%4; // not working > > I thought this would be the case when I saw the original expression. Maybe we need to teach module arithmetic to SCEV? I let this thread get stale, so here’s the
2013 Nov 06
0
[LLVMdev] loop vectorizer
Sent from my iPhone > On Nov 5, 2013, at 7:39 PM, Frank Winter <fwinter at jlab.org> wrote: > > Good that you bring this up. I still have no solution to this vectorization problem. > > However, I can rewrite the code and insert a second loop which eliminates the 'urem' and 'div' instructions in the index calculations. In this case, the inner loop's trip