similar to: [LLVMdev] A simple case about SDiv

Displaying 20 results from an estimated 9000 matches similar to: "[LLVMdev] A simple case about SDiv"

2008 Sep 06
0
[LLVMdev] A simple case about SDiv
Hello, > eh... I got some error as following: > llvm-gcc -O2 -mllvm -disable-llvm-optzns -emit-llvm -c test.c -o test.ll -S You need to pass these pair of options directly to cc1, driver is breaking them. -- WBR, Anton Korobeynikov
2008 Sep 04
3
[LLVMdev] A simple case about SDiv
Hi, I have a simple C case as following: int test(int x, int y) { return -x / -y; } With llvm-gcc -O1, I got: define i32 @test(i32 %x, i32 %y) nounwind { entry: sub i32 0, %x ; <i32>:0 [#uses=1] sub i32 0, %y ; <i32>:1 [#uses=1] sdiv i32 %0, %1 ; <i32>:2 [#uses=1] ret i32 %2 } With llvm-gcc -O2, I got: define i32 @test(i32 %x, i32 %y) nounwind { entry: sdiv i32
2008 Sep 05
0
[LLVMdev] A simple case about SDiv
> Any ideas? Most likely it is the gcc folder doing it. This gcc optimization is run in llvm-gcc because it's basically impossible to turn it off! You can check by passing -mllvm -disable-llvm-optzns to llvm-gcc along with -O2. If the optimization still occurs then it was gcc that did it. Ciao, Duncan.
2008 Sep 04
2
[LLVMdev] A simple case about SDiv
Hi Duncan, Thanks for your help. But seems "opt -std-compile-opts" can't do this simplication :( Any ideas? Sheng. 2008/9/4 Duncan Sands <baldrick at free.fr> > > I tried several passes, like -instcombine, -simplifycfg, -gcse -globaldce > > -globalopt -adce , but all failed to do this transform. > > Try "opt -std-compile-opts
2010 Nov 10
1
[LLVMdev] Fw: llvm-gcc not compatible with gcc on a small case?
Whoops, forgot to CC: the list. > >----- Forwarded Message ---- >From: Samuel Crow <samuraileumas at yahoo.com> >To: Sheng Zhou <zhousheng00 at gmail.com> >Sent: Tue, November 9, 2010 9:26:51 PM >Subject: Re: [LLVMdev] llvm-gcc not compatible with gcc on a small case? > > >Hi Sheng Zhou, > > >It shouldn't compile. You have the method declared
2008 Sep 04
0
[LLVMdev] A simple case about SDiv
> I tried several passes, like -instcombine, -simplifycfg, -gcse -globaldce > -globalopt -adce , but all failed to do this transform. Try "opt -std-compile-opts -debug-pass=Arguments" If that does the simplification, then try bisecting the set of passes it ran (printed thanks to -debug-pass) to find out which combination did it. Ciao, Duncan.
2010 Nov 10
2
[LLVMdev] llvm-gcc not compatible with gcc on a small case?
I found a case which gcc can compile while llvm-gcc can not. I'm using the gcc4.1 and the most recent llvm-gcc. Here is the case: template <int N> class T { public: int V; }; T<4> test(T<4> a[4][8]) { return a[3][3]; } llvm-gcc dumped: fail.cpp: In function \u2018T<4> test(T<4> (*)[8])\u2019: fail.cpp:7: error: invalid use of incomplete type
2006 Oct 17
0
[LLVMdev] Signedness Elminiation
All, Please welcome Zhou Sheng <zhousheng00 at gmail.com> to the LLVM development community. Sheng is from Beijing and is a Masters student at the University there. Sheng and I will be working together on some significant changes to LLVM in the coming months. Our first task is to implement integer types without signs in LLVM. You can read Chris Lattner's notes on this change at this
2008 Aug 13
4
[LLVMdev] A case where llvm created different cfg for same code
> > Message: 4 > Date: Tue, 12 Aug 2008 13:23:52 -0700 > From: "Bill Wendling" <isanbard at gmail.com> > Subject: Re: [LLVMdev] A case where llvm created different cfg for > same code > To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> > Message-ID: > <16e5fdf90808121323g1ae2a2e3lb6c5bd62521df621 at mail.gmail.com> >
2018 Jan 09
0
Is -disable-llvm-passes and -disable-llvm-optzns different?
There's a hack in lib/Driver/ToolChains/Clang.cpp to accept "-mllvm -disable-llvm-optzns" as a hack for legacy compatibility. It's deprecated and the -Xclang spelling should be used. There does appear to be a bug with "-mllvm -disable-llvm-optzns" and -save-temps. -save-temps causes clang to be invoked separately to text assembly into binary code, and it looks like
2018 Jan 09
0
Is -disable-llvm-passes and -disable-llvm-optzns different?
clang -O3 -mllvm -help -c LULESH.cc succeeds. On Tue, Jan 9, 2018 at 2:05 AM, toddy wang <wenwangtoddy at gmail.com> wrote: > Quick results: > > [twang15 at c89 temp]$ clang -mllvm -help > clang-5.0: error: no input files > [twang15 at c89 temp]$ clang -mllvm -help-hidden > clang-5.0: error: no input files > [twang15 at c89 temp]$ clang -mllvm --help-hidden >
2018 Jan 09
1
Is -disable-llvm-passes and -disable-llvm-optzns different?
Thanks for pointing this out. The following is a more extensive test. //succeed means dumping help info without Error message. clang -help #succeed 'clang -help-hidden' #Fail 'clang --help-hidden' #Succeed clang -mllvm -v -help #Succeed clang -mllvm -v -help-hidden #Fail clang -mllvm -v --help-hidden #Succeed 'clang -mllvm -help -c LULESH.cc' #Succeed 'clang -mllvm
2008 Aug 12
1
[LLVMdev] A case where llvm created different cfg for same code
Hi, The following two segments of code are actually the same, but llvm created different cfg for them. Form1: 1 #define N 10 2 int test(int A[N][N]) 3 { 4 int i, j; 5 int result =0; 6 for(j=0; j+2<N; ++j) { 7 //for(i=0; i<j && i+j+1<N; i++) { 8 for(i=0; i<j && i<N-j-1; i++) { 9 A[i+j+1][j] = A[j + 2][j-i] + i; 10 } 11 } 12 13 for (i=0; i<N-2; ++i) 14 for (j=0;
2018 Jan 09
3
Is -disable-llvm-passes and -disable-llvm-optzns different?
Quick results: [twang15 at c89 temp]$ clang -mllvm -help clang-5.0: error: no input files [twang15 at c89 temp]$ clang -mllvm -help-hidden clang-5.0: error: no input files [twang15 at c89 temp]$ clang -mllvm --help-hidden clang-5.0: error: no input files [twang15 at c89 temp]$ clang -mllvm --help clang-5.0: error: no input files Anything wrong? On Tue, Jan 9, 2018 at 1:56 AM, Craig Topper
2018 Jan 09
2
Is -disable-llvm-passes and -disable-llvm-optzns different?
Hi guys, According to this patch review: *Title: Remove the '-disable-llvm-passes' flag (which I didn't even know existed, and I suspect many others aren't aware of either) and strength '-disable-llvm-optzns' to do the same thing* Link: https://reviews.llvm.org/D28047 *-disable-llvm-optzns and -disable-llvm-passes are aliasing each other.* *1. Both can be passed to cc1
2009 Apr 28
1
[LLVMdev] O3 passes
Thanks for the help. When I run the following (where $llvm is the path to my llvm installation): $llvm/bin/llvm-gcc -c -o - -O1 tmp.c -emit-llvm -mllvm --disable-llvm-optzns | $llvm/bin/opt -raiseallocs I get the following error: cc1: error: unrecognized command line option "-fdisable-llvm-optzns" I am running llvm 2.5. I performed a $llvm/libexec/gcc/i686-pc-linux-gnu/4.2.1/cc1
2008 Mar 04
0
[LLVMdev] llvm-gcc 4.2 building failed on x86-64
Hi Sheng Am Dienstag, 4. März 2008 schrieb Zhou Sheng: > Current llvm-gcc 4.2 building failed on X86-64, here is the dump I am not followng head closely but may it be that the current head still doesn't support amd64 proper: gcc README.LLVM: "When targeting non-darwin X86-64/AMD-64/EM64-T, configure with --disable-shared. The LLVM X86-64 backend doesn't support PIC codegen on
2007 Nov 23
1
[LLVMdev] Will any pass change simple return branch into select/return pair?
Hi, Can any llvm pass change simple return branch into select/return pair? For example: define i10 @mod_N(i10 zeroext %a) zeroext { entry: %tmp2 = icmp ugt i10 %a, -400 ; <i1> [#uses=1] br i1 %tmp2, label %cond_true, label %return cond_true: ; preds = %entry %tmp5 = add i10 %a, 400 ; <i10> [#uses=1] ret i10 %tmp5 return: ; preds = %entry ret
2009 Apr 28
0
[LLVMdev] O3 passes
On Tuesday 28 April 2009 09:19:19 am Ryan M. Lefever wrote: > Can I specify passes that I want run directly to llvm-gcc? I don't want > all of -O3, for example. I tried llvm-gcc -raiseallocs ..., but that > didn't work. I also tried running cc1 directly and it didn't take > -raiseallocs as a parameter either. You are better off run passes explicitly using opt. Try
2009 Jan 13
0
[LLVMdev] llvm-gcc doesnt honor volatile quantifier of the array type?
This looks wrong to me, though the x86 backend produces code that does the right thing (reads each element once). If you change the code (see below) to read each element twice, llvm-gcc still does the right thing but llvm-g++ does not (i.e. it fails to read aech location twice). Current versions of gcc/g++ also look wrong. All 4 compilers (gcc,g++,llvm-gcc,llvm-g++) do the right thing when