similar to: [LLVMdev] Calls to functions with signext/zeroext return values

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Calls to functions with signext/zeroext return values"

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
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
2009 Feb 11
0
[LLVMdev] Bug in SelectionDAGBuild.cpp?
I'm hitting a problem in SelectionDAGBuild::visitRet(), mainly: MVT VT = ValueVTs[j]; // 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. if (VT.isInteger()) { MVT MinVT = TLI.getRegisterType(MVT::i32); if (VT.bitsLT(MinVT)) VT = MinVT;
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
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
2016 Sep 06
2
i32 vs i32 signext for C int parameters to library functions
I'm trying to fix a longstanding bug with library function calls on platforms where int is passed sign-extended in a register (it badly affects SystemZ, and has a chance of affecting PowerPC64, SPARC64, MIPS64 as well). The problem is that, on these platforms, C int corresponds to a "i32 signext" parameter, but all LLVM passes inserting library calls currently use just
2015 Jul 23
2
[LLVMdev] signext on function parameters and return.
Hello, For a simple function taking a short and returning a short, clang generates IR with this function signature: define signext i16 @foo(i16 signext %x) Some questions please: 1) For the input parameter and return value, does the target control whether clang uses signext vs something else? If so, how does this target query work? 2) Does the presence of the signext mean it's imperative
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
2013 Sep 04
2
[LLVMdev] Semantics of noalias with vector of pointers?
Hi, What are the intended semantics of noalias when applied to a vector of pointers? signext/zeroext parameter attributes are incorrectly rejected for vectors (bug 15391), and I'm not sure if the same is true for noalias when applied to pointer vectors. There's no mention of it in the langref, and the verifier currently rejects it. Is it supposed to work? Are pointers within the
2008 Feb 27
2
[LLVMdev] 16-bit target problem
Has any one been successful with a 16-bit target? I'm new to LLVM and am having problems. One problem I found stems from code in lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp: visitRet(): // If this is an integer return value, we need to promote it ourselves to // the full width of a register, since getCopyToParts and Legalize will use // ANY_EXTEND rather than sign/zero. // FIXME:
2015 Jul 23
0
[LLVMdev] signext on function parameters and return.
> -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Steve King > Sent: 23 July 2015 01:45 > To: llvmdev at cs.uiuc.edu > Subject: [LLVMdev] signext on function parameters and return. > > Hello, > For a simple function taking a short and returning a short, clang > generates IR with this function
2013 Feb 26
1
[LLVMdev] passing vector of booleans to functions
Hi Duncan, thanks for the hint. I tried both variants: define <4 x float> @masked_add_1(<4 x i1> signext %mask, <4 x float> %a, <4 x float> %b) define <4 x float> @masked_add_32(<4 x i32> %mask, <4 x float> %a, <4 x float> %b) Unfortunately, this will raise an assertion: Wrong types for attribute: zeroext signext noalias nocapture sret byval nest
2009 Mar 14
0
[LLVMdev] promotion of return value.
Hi, > What we are trying to do is to add new attributes (more maybe added > later): > > > sign_ext_from_i8, sign_ext_from_i16 > > zero_ext_from_i8, zero_ext_from_i16 > > to function definition so (assuming that both caller and callee are > generated in the same front-end) the caller will know if the callee has > already extended the return value or not, then
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
2009 Apr 01
0
[LLVMdev] promotion of return value.
On Mar 31, 2009, at 12:04 PM, Rafael Espindola wrote: >> Did you see this Ali? >> http://nondot.org/sabre/LLVMNotes/ExtendedIntegerResults.txt > > Would you mind adding it to SVN? Would make it easier > to comment on. In particular, it would be nice to add > examples for X86 (caller extends. High bits undefined > in the callee) and PPC (callee extends). Sure, I checked
2007 Dec 15
2
[LLVMdev] fix warning with newer g++ compilers
Ok, here is the patch again... I also included fixes for the bits that originally gave my mailer fits... Two votes for orange, so I went with orange... Doing diffs in .: --- ./lib/AsmParser/LLLexer.cpp.~1~ 2007-12-14 22:09:06.000000000 -0800 +++ ./lib/AsmParser/LLLexer.cpp 2007-12-15 13:02:47.000000000 -0800 @@ -54,7 +54,7 @@ static uint64_t HexIntToVal(const char * Result +=
2008 Oct 06
2
[LLVMdev] (Function) attributes documentation
Hi all, due to the recent changes regarding paramater/function/return type attributes, I think the documentation around that could use some improvement. In particular, I see the following problems: * The section "Functions" in the LangRef has a large textual description about how it should look, but no definition of syntax, or even a few examples of the syntax. This makes it very
2008 Apr 30
3
[LLVMdev] c char translated to i8 signext
I have a c function that takes a char as a parameter. When it is compiled to bytecode, it gets translated to i8 signext. Why is signext getting added to the type? It doesn't get added if the parameter is an int. Is there a way to alter the parameter in the c code so that it simply gets translated to an i8, or is there a way in LLVM to modify the parameter's type? By the way, I am
2013 Feb 26
0
[LLVMdev] passing vector of booleans to functions
Hi Roland, > define <4 x float> @masked_add_1(<4 x i1> %mask, <4 x float> %a, <4 x float> %b) { > entry: > %add = fadd <4 x float> %a, %b > %sel = select <4 x i1> %mask, <4 x float> %add, <4 x float> %a > ret <4 x float> %sel > } > > I will get: > > addps %xmm1, %xmm2 > pslld $31, %xmm0 >
2009 Mar 13
4
[LLVMdev] promotion of return value.
Some targets want to do the promotion in the callee and some in the caller. Now what you are discussing in your bug is we shouldn't do in both... Now the tricky part is that many targets (not for the sake of promotion, but for the sake of performance) return a smaller value in a larger register (say if the function is to return char, they return it in 32 bit register); So they are effectively