summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/mips-varargs.c
Commit message (Collapse)AuthorAgeFilesLines
* [mips64][clang] Adjust tests to account for changes in r338239Stefan Maksimovic2018-07-301-2/+6
| | | | llvm-svn: 338246
* [mips] Make checks in CodeGen/mips-varargs.c less fragileSimon Dardis2017-05-231-33/+34
| | | | | | | | | | | | | | | | This test was failing on our fork of clang because it was not capturing [[ARG]] in the N32 case. Therefore it used the value from the last function which does not always have to be the same. All other cases were already capturing ARG so this appears to be an oversight. The test now uses -enable-var-scope to prevent such errors in the future. Reviewers: sdardis, atanasyan Patch by: Alexander Richardson Differential Revision: https://reviews.llvm.org/D32425 llvm-svn: 303619
* Fix clang/test/CodeGen/mips-varargs.c for -Asserts, possibly typo.NAKAMURA Takumi2015-09-081-1/+1
| | | | llvm-svn: 246994
* Compute and preserve alignment more faithfully in IR-generation.John McCall2015-09-081-135/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [CodeGen] Update a test-case affected by folding IntToPtr/PtrToInt into LoadsDavid Majnemer2015-05-281-7/+10
| | | | | | | | | | | Folding IntToPtr or PtrToInt into Loads, due to r238452, perturbs the mips-varargs test-case. Patch by Philip Pfaffe! Differential Revision: http://reviews.llvm.org/D9153 llvm-svn: 238455
* Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie2015-02-271-22/+22
| | | | llvm-svn: 230795
* Update Clang tests to handle explicitly typed gep changes in LLVM.David Blaikie2015-02-271-12/+12
| | | | llvm-svn: 230783
* [mips] Fix va_arg() for pointer types on big-endian N32.Daniel Sanders2015-01-131-0/+49
| | | | | | | | | | | | | | | | | | | | | Summary: The Mips ABI's treat pointers in the same way as integers. They are sign-extended to 32-bit for O32, and 64-bit for N32/N64. This doesn't matter for O32 and N64 where pointers are already the correct width but it does matter for big-endian N32, where pointers are 32-bit and need promoting. The caller side is already passing pointers correctly. This patch corrects the callee. Reviewers: vmedic, atanasyan Reviewed By: atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6812 llvm-svn: 225782
* Update Clang tests that run the LLVM optimizer to reflect the changedChandler Carruth2014-11-251-25/+17
| | | | | | canonicalization in r222748. No interesting functionality changed here. llvm-svn: 222749
* Revert "[Reassociate] Update test cases due to r222142."Chad Rosier2014-11-191-1/+1
| | | | | | | | | This reverts commit r222144. Commit r222142 is being reverted due to a spec2006/gcc execution-time regression. Update mips-varargs test as well. llvm-svn: 222397
* Allow EmitVAArg() to promote types and use this to fix some N32/N64 vararg ↵Daniel Sanders2014-11-191-17/+149
| | | | | | | | | | | | | | | | | | | | | issues for Mips. Summary: With this patch, passing a va_list to another function and reading 10 int's from it works correctly on a big-endian target. Based on a pair of patches by David Chisnall, one of which I've reworked for the current trunk. Reviewers: theraven, atanasyan Reviewed By: theraven, atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6248 llvm-svn: 222339
* [mips] Fix r218248's testcase to use -O1 instead of -O3.Daniel Sanders2014-09-231-3/+3
| | | | llvm-svn: 218298
* Fix test/CodeGen/mips-varargs.c to use %clang_cc1Kaelyn Takata2014-09-221-3/+3
| | | | | | | Only tests under test/Driver should use %clang, and test/CodeGen in particular must always use %clang_cc1. llvm-svn: 218260
* clang/test/CodeGen/mips-varargs.c: Fixup for -Asserts.NAKAMURA Takumi2014-09-221-21/+20
| | | | llvm-svn: 218256
* [mips] Correct alignment of vectors passed in varargs for the O32 ABI.Daniel Sanders2014-09-221-0/+53
Summary: Vectors are normally 16-byte aligned, however the O32 ABI enforces a maximum alignment of 8-bytes since the base of the stack is 8-byte aligned. Previously, this was enforced on the caller side, but not on the callee side. This fixes the output of OpenCL's printf when given vectors. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: llvm-commits, pekka.jaaskelainen Differential Revision: http://reviews.llvm.org/D5433 llvm-svn: 218248
OpenPOWER on IntegriCloud