summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/arm-abi-vector.c
Commit message (Collapse)AuthorAgeFilesLines
* Reverting Neon vector type 64-alignment fixJaved Absar2017-05-301-7/+7
| | | | | | | The patch caused ABI breaks on darwin/others. Reverting to come back with a more restrictive patch. llvm-svn: 304220
* [ARM] Fix Neon vector type alignment to 64-bitJaved Absar2017-05-301-7/+7
| | | | | | | | | | | The maximum alignment for ARM NEON data types should be 64-bits as specified in ARM procedure call standard document Sec. A.2 Notes. This patch fixes it from its current larger natural default values, except for Android (so as not to break existing ABI). Reviewed by: Stephen Hines, Renato Golin. Differential Revision: https://reviews.llvm.org/D33205 llvm-svn: 304201
* LLDB JIT needs android vector passing rules.Stephen Hines2015-12-041-0/+68
| | | | | | | | | | | | | | | | Summary: Looking into some recent issues with LLDBs expression parser highlighted that upstream clang passes vectors types differently to Android Open Source Project's clang for Arm Android targets. This patch reflects the changes present in the AOSP and allows LLDB's JIT expression evaluation to work correctly for Arm Android targets when passing vectors. This is submitted with consent of the original author Stephen Hines. Reviewers: asl, rsmith, ADodds, rnk Subscribers: rnk, aemerson, tberghammer, danalbert, srhines, cfe-commits, pirama Differential Revision: http://reviews.llvm.org/D14639 llvm-svn: 254682
* Compute and preserve alignment more faithfully in IR-generation.John McCall2015-09-081-62/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce an Address type to bundle a pointer value with an alignment. Introduce APIs on CGBuilderTy to work with Address values. Change core APIs on CGF/CGM to traffic in Address where appropriate. Require alignments to be non-zero. Update a ton of code to compute and propagate alignment information. As part of this, I've promoted CGBuiltin's EmitPointerWithAlignment helper function to CGF and made use of it in a number of places in the expression emitter. The end result is that we should now be significantly more correct when performing operations on objects that are locally known to be under-aligned. Since alignment is not reliably tracked in the type system, there are inherent limits to this, but at least we are no longer confused by standard operations like derived-to-base conversions and array-to-pointer decay. I've also fixed a large number of bugs where we were applying the complete-object alignment to a pointer instead of the non-virtual alignment, although most of these were hidden by the very conservative approach we took with member alignment. Also, because IRGen now reliably asserts on zero alignments, we should no longer be subject to an absurd but frustrating recurring bug where an incomplete type would report a zero alignment and then we'd naively do a alignmentAtOffset on it and emit code using an alignment equal to the largest power-of-two factor of the offset. We should also now be emitting much more aggressive alignment attributes in the presence of over-alignment. In particular, field access now uses alignmentAtOffset instead of min. Several times in this patch, I had to change the existing code-generation pattern in order to more effectively use the Address APIs. For the most part, this seems to be a strict improvement, like doing pointer arithmetic with GEPs instead of ptrtoint. That said, I've tried very hard to not change semantics, but it is likely that I've failed in a few places, for which I apologize. ABIArgInfo now always carries the assumed alignment of indirect and indirect byval arguments. In order to cut down on what was already a dauntingly large patch, I changed the code to never set align attributes in the IR on non-byval indirect arguments. That is, we still generate code which assumes that indirect arguments have the given alignment, but we don't express this information to the backend except where it's semantically required (i.e. on byvals). This is likely a minor regression for those targets that did provide this information, but it'll be trivial to add it back in a later patch. I partially punted on applying this work to CGBuiltin. Please do not add more uses of the CreateDefaultAligned{Load,Store} APIs; they will be going away eventually. llvm-svn: 246985
* [opaque pointer types] Explicit non-pointer type for call expressionsDavid Blaikie2015-04-161-16/+16
| | | | | | (migration for recent LLVM change to textual IR for calls) llvm-svn: 235147
* Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie2015-02-271-9/+9
| | | | llvm-svn: 230795
* Update Clang tests to handle explicitly typed gep changes in LLVM.David Blaikie2015-02-271-16/+16
| | | | llvm-svn: 230783
* ARM ABI: fix testing case arm-abi-vector.c by using [[VAR]]Manman Ren2012-10-161-92/+91
| | | | | | rdar://12439123 llvm-svn: 166066
* XFAIL this testing case to recover buildbotManman Ren2012-10-161-0/+1
| | | | llvm-svn: 166064
* ARM ABI: fix ABI alignment issues in varargs.Manman Ren2012-10-161-0/+35
| | | | | | | | We generalize r166040 to handle ABI alignment issues for all types. rdar://12439123 llvm-svn: 166052
* ARM ABI: passing illegal vector types as varargs.Manman Ren2012-10-161-0/+190
| | | | | | | | | | | | | | We expand varargs in clang and the call site is handled in the back end, it is hard to match exactly how illegal vectors are handled in the backend. Therefore, we legalize the illegal vector types in clang: if (Size <= 32), legalize to i32. if (Size == 64), legalize to v2i32. if (Size == 128), legalize to v4i32. if (Size > 128), use indirect. rdar://12439123 llvm-svn: 166043
* ARM ABI: fix ABI alignment issues when passing legal vector types as varargs.Manman Ren2012-10-161-0/+38
We create an aligned temporary space and copy the content over from ap.cur to the temporary space. This is necessary if the natural alignment of the type is greater than the ABI alignment. rdar://12439123 llvm-svn: 166040
OpenPOWER on IntegriCloud