search for: zeroexts

Displaying 20 results from an estimated 112 matches for "zeroexts".

Did you mean: zeroext
2014 Dec 26
3
[LLVMdev] Correct usage of `llvm.assume` for loop vectorization alignment?
Using LLVM ToT and Hal's helpful slide deck [1], I've been trying to use `llvm.assume` to communicate pointer alignment guarantees to vector load and store instructions. For example, in [2] %5 and %9 are guaranteed to be 32-byte aligned. However, if I run this IR through `opt -O3 -datalayout -S`, the vectorized loads and stores are still 1-byte aligned [3]. What's going wrong? Do I
2011 Mar 16
0
[LLVMdev] Calls to functions with signext/zeroext return values
On Mar 16, 2011, at 5:58 AM, Ken Dyck wrote: > In SelectionDAGBuilder::visitRet(), there is this bit of code: > > // FIXME: C calling convention requires the return type to be promoted > // to at least 32-bit. But this is not necessary for non-C calling > // conventions. The frontend should mark functions whose return values > // require promoting
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
2011 Mar 16
3
[LLVMdev] Calls to functions with signext/zeroext return values
In SelectionDAGBuilder::visitRet(), there is this bit of code: // FIXME: C calling convention requires the return type to be promoted // to at least 32-bit. But this is not necessary for non-C calling // conventions. The frontend should mark functions whose return values // require promoting with signext or zeroext attributes. if (ExtendKind !=
2011 Mar 16
2
[LLVMdev] Calls to functions with signext/zeroext return values
On Mar 16, 2011, at 9:31 AM, Cameron Zwarich wrote: > Promoting the return value is unsafe for bool returns on x86-64, which in the latest revision of the ABI only guarantees that the top 7 bits of the 8-bit register are 0. My comment is a bit off, because the question of what type to make the return value is somewhat orthogonal to the question of which zext assert we should add. Cameron
2011 Mar 16
0
[LLVMdev] Calls to functions with signext/zeroext return values
On Wed, Mar 16, 2011 at 12:35 PM, Cameron Zwarich <zwarich at apple.com> wrote: > On Mar 16, 2011, at 9:31 AM, Cameron Zwarich wrote: > >> Promoting the return value is unsafe for bool returns on x86-64, which >> in the latest revision of the ABI only guarantees that the top 7 bits of >> the 8-bit register are 0. > > My comment is a bit off, because the question
2020 May 15
2
Issues with new Attributor (replaceAllUses fails with type mismatch)
[AMD Official Use Only - Internal Distribution Only] Hi , There seems to be some issue with attributor, exactly in File Attributor.cpp, Function Attributor::rewriteFunctionSignatures(), Line No: 1600 (approrimate). The llvm source code at above address is as follows: // Eliminate the instructions *after* we visited all of them. for (auto &CallSitePair : CallSitePairs) {
2012 Oct 22
4
[LLVMdev] [cfe-commits] [PATCH/RFC, PowerPC] Extend 32-bit function arguments / return values
So, I'm not really sure if this is the right approach. I'd like some folks from the LLVM side of things to chime in. In general, I'm not certain we want to continue growing our dependence on the signext and zeroext attributes on return types, or whether we want to do the extension in the frontend instead. Most of the targets in Clang currently eagerly zext or sext the return value to
2020 May 15
2
Issues with new Attributor (replaceAllUses fails with type mismatch)
Hi Suresh, thanks for reporting this! I thought I fixed this with 8d94d3c3b44c3a27a69b153cef9be4b8e481150e. Did you run before or after that commit? Cheers, Johannes On 5/15/20 7:17 AM, Mani, Suresh via llvm-dev wrote: > [AMD Public Use] > > Hi , > > Please ignore the earlier header of Internal and Official use only. > > Thanks > M Suresh > > From: llvm-dev
2012 Oct 22
0
[LLVMdev] [cfe-commits] [PATCH/RFC, PowerPC] Extend 32-bit function arguments / return values
On 22 October 2012 14:53, Chandler Carruth <chandlerc at google.com> wrote: > So, I'm not really sure if this is the right approach. I'd like some > folks from the LLVM side of things to chime in. > > In general, I'm not certain we want to continue growing our dependence > on the signext and zeroext attributes on return types, or whether we > want to do the
2010 Jan 28
3
[LLVMdev] llvm interpreter cannot execute llvm-gcc generated bitcode
Hi! We are compiling a very large C project in llvm and trying to execute it in interpreter. There is a problem with executing the generated bitcode. We are using lli.exe and llvm-gcc.exe from official 2.6 LLVM release. We have localized the problem to following c code: -------------------- int f(unsigned char x) __attribute__((noinline)); int f(unsigned char x) { return x - 1; } int main()
2016 Jul 01
0
Path condition propagation
On Thu, Jun 30, 2016 at 6:09 PM, Carlos Liam via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hi all, > > Consider this C code: > > #include <stdbool.h> > > bool func(int n1, int n2, bool b) { > bool greater = n1 > n2; > if (greater && b) { > if (n1 == n2) { > return false; // unreachable > } >
2016 Jul 01
3
Path condition propagation
Hi all, Consider this C code: #include <stdbool.h> bool func(int n1, int n2, bool b) { bool greater = n1 > n2; if (greater && b) { if (n1 == n2) { return false; // unreachable } } return true; } The line marked unreachable cannot be reached, however currently LLVM does not optimize it out. I believe this is because LLVM does not
2013 Jan 18
2
[LLVMdev] Weird volatile propagation ?
Hi All, Using clang+llvm at head, I noticed a weird behaviour with the following reduced testcase : $ cat test.c #include <stdint.h> struct R { uint16_t a; uint16_t b; }; volatile struct R * const addr = (volatile struct R *) 416; void test(uint16_t a) { struct R r = { a, 1 }; *addr = r; } $ clang -O2 -o - -emit-llvm -S -c test.c ; ModuleID = 'test.c' target
2019 Sep 26
2
Optimizing functions using logical operators
Hi, I’m looking at what the LLVM compilation chain does to optimize the following functions using logical operators. The one using integer type (t1 and t3) are optimized, but not the ones using float type (t2 and t4), even when using -O3 or -Ofast. Why is that ? Thera are those kind of optimizations done in the LLVM source code? Thanks. bool t1(int v1) { return (2 + v1) == 7; } bool
2013 Mar 25
1
[LLVMdev] Debug metadata after simplifications
Hi all, In order to identify loops I'm using the DILexicalScope metadata attached to the loop latch, but with some combinations of optimisations that metadata seems to disappear. For example, when -simplifycfg removes a block because it only contains a branch, and -loop-simplify recreates that block because it turned out to be a back-edge of some loop, the metadata gets removed.
2016 Jul 01
3
Path condition propagation
On Thu, Jun 30, 2016 at 6:45 PM, Daniel Berlin via llvm-dev < llvm-dev at lists.llvm.org> wrote: > > > On Thu, Jun 30, 2016 at 6:09 PM, Carlos Liam via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi all, >> >> Consider this C code: >> >> #include <stdbool.h> >> >> bool func(int n1, int n2, bool b) { >>
2012 Oct 23
2
[LLVMdev] [cfe-commits] [PATCH/RFC, PowerPC] Extend 32-bit function arguments / return values
On 22/10/12 21:12, Rafael Espíndola wrote: > On 22 October 2012 14:53, Chandler Carruth <chandlerc at google.com> wrote: >> So, I'm not really sure if this is the right approach. I'd like some >> folks from the LLVM side of things to chime in. >> >> In general, I'm not certain we want to continue growing our dependence >> on the signext and
2010 Jan 28
0
[LLVMdev] llvm interpreter cannot execute llvm-gcc generated bitcode
Kristaps Straupe wrote: > Hi! > > We are compiling a very large C project in llvm and trying to execute > it in interpreter. There is a problem with executing the generated > bitcode. The interpreter is under-maintained in general, but this bug in particular is fixed SVN as-of r86428. Are you on a platform that isn't supported by llvm's jit? Nick > We are using
2011 Feb 07
2
[LLVMdev] Promoting i16 load to i32
Hi, I'm working on an LLVM backend for an architecture which does not natively support half-word loads. I'm having trouble getting LLVM to promote i16 to i32 loads for me - should I expect LLVM to be able to do this, are do I have to write a custom lowerer? This post (http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/019929.html) gave me the impression that it should be possible,