aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen
AgeCommit message (Collapse)Author
2010-08-30Fix PR8029, a x86-32 ABI regression in introduced in r112211Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112537 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26add radar #Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112212 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26fix 2xi16 to pass as i32 instead of <2 x i16>. The former passes inChris Lattner
memory (as required) the later now passes in an xmm register. This fixes gcc.dg/compat/vector_1 on x86-32. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112211 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26vector of long and ulong are also classified as INTEGER in x86-64 abi,Chris Lattner
this fixes rdar://8358475 a failure of the gcc.dg/compat/vector_1 abi test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-261 x ulonglong needs to be classified as INTEGER, just like 1 x longlong,Chris Lattner
this fixes a miscompilation on the included testcase, rdar://8359248 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112201 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26tame an assertion, fixing rdar://8357396Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112174 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25Revert r112043, static volatiles are removed by the optimizer. Thanks Chris!Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112112 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25Finally pass "two floats in a 64-bit unit" as a <2 x float> instead ofChris Lattner
as a double in the x86-64 ABI. This allows us to generate much better code for certain things, e.g.: _Complex float f32(_Complex float A, _Complex float B) { return A+B; } Used to compile into (look at the integer silliness!): _f32: ## @f32 ## BB#0: ## %entry movd %xmm1, %rax movd %eax, %xmm1 movd %xmm0, %rcx movd %ecx, %xmm0 addss %xmm1, %xmm0 movd %xmm0, %edx shrq $32, %rax movd %eax, %xmm0 shrq $32, %rcx movd %ecx, %xmm1 addss %xmm0, %xmm1 movd %xmm1, %eax shlq $32, %rax addq %rdx, %rax movd %rax, %xmm0 ret Now we get: _f32: ## @f32 movdqa %xmm0, %xmm2 addss %xmm1, %xmm2 pshufd $16, %xmm2, %xmm2 pshufd $1, %xmm1, %xmm1 pshufd $1, %xmm0, %xmm0 addss %xmm1, %xmm0 pshufd $16, %xmm0, %xmm1 movdqa %xmm2, %xmm0 unpcklps %xmm1, %xmm0 ret and compile stuff like: extern float _Complex ccoshf( float _Complex ) ; float _Complex ccosf ( float _Complex z ) { float _Complex iz; (__real__ iz) = -(__imag__ z); (__imag__ iz) = (__real__ z); return ccoshf(iz); } into: _ccosf: ## @ccosf ## BB#0: ## %entry pshufd $1, %xmm0, %xmm1 xorps LCPI4_0(%rip), %xmm1 unpcklps %xmm0, %xmm1 movaps %xmm1, %xmm0 jmp _ccoshf ## TAILCALL instead of: _ccosf: ## @ccosf ## BB#0: ## %entry movd %xmm0, %rax movq %rax, %rcx shlq $32, %rcx shrq $32, %rax xorl $-2147483648, %eax ## imm = 0xFFFFFFFF80000000 addq %rcx, %rax movd %rax, %xmm0 jmp _ccoshf ## TAILCALL There is still "stuff to be done" here for the struct case, but this resolves rdar://6379669 - [x86-64 ABI] Pass and return _Complex float / double efficiently git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112111 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25Make sure volatile variables are emitted even if static. Fixes rdar://8315219Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112043 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25IRgen: Fix a horrible bug in pointer to bool conversion, which we were treatingDaniel Dunbar
as a truncation not a comparison to null. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112021 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25Fix 'for' loop variables' scope.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112002 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24Add some missing X86-specific asm constraint letters, and fixDale Johannesen
some bugs in setting allowsRegister on the ones there. 8348447. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111980 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23Emit debug info for enum constants.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111852 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-22Go back to asking CodeGenTypes whether a type is zero-initializable.John McCall
Make CGT defer to the ABI on all member pointer types. This requires giving CGT a handle to the ABI. It's way easier to make that work if we avoid lazily creating the ABI. Make it so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111786 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-21Avoid including mm_malloc.h in a cc1 test, it pulls in system headers.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111738 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-21This test needs a triple: it's checking the alignment of a pointer in bytes.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111727 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-21IRgen: Set the alignment correctly when creating LValue for a decls.Daniel Dunbar
- Fixes PR5598. - Review appreciated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111726 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-21Improve test coverage.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111712 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20fix some vector extractions to return properly zero extended valuesChris Lattner
(instead of sign extending) to match ICC. GCC is changing this in a series of their own PRs (e.g. 41323). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111637 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19support for predicates with bool/pixel argumentsAnton Yartsev
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111515 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19support for the rest of AltiVec functions with bool/pixel arguments and ↵Anton Yartsev
return values (except predicates) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111511 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19support for vec_perm and all dependent functions (vec_mergeh, vec_mergel, ↵Anton Yartsev
vec_pack, vec_sld, vec_splat) with bool/pixel arguments and return values git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111509 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16support for vec_add, vec_adds, vec_and, vec_andc with bool argumentsAnton Yartsev
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111141 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-13Make use of __func__ in a block actually refer toFariborz Jahanian
block's helper function. Fixes radar 7860965. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110988 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12update test to reflect r110876 change.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110884 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11Revise r110163: don't mark weak functions nounwind, because the optimizerJohn McCall
treats that as a contract to be fulfilled by any replacements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110864 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11Remove rsqrtps_nr256 and sqrtps_nr256 builtins, at least until we need themBruno Cardoso Lopes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110844 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11ARM: Recognize single precision float register names.Daniel Dunbar
- We don't recognize double or NEON register names yet -- we don't have the infrastructure to generate the right clobbers for them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110775 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11ARM: Swap which registers we consider real / aliases to match LLVM and llvm-gcc.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110774 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11Remove 256-bit cast built-ins and make the AVX intrinsic call llvm ↵Bruno Cardoso Lopes
__builtin_shufflevector with the appropriate arguments git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110771 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11Remove 256-bit unpack built-ins and make the AVX intrinsic call llvm ↵Bruno Cardoso Lopes
__builtin_shufflevector with the appropriate arguments git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110768 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11Remove 256-bit shuffle built-ins and make the AVX intrinsic call llvm ↵Bruno Cardoso Lopes
__builtin_shufflevector with the appropriate arguments git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110766 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10Something's wrong with this test on other platforms. I'll probably need to ↵John Thompson
simplify it later. For now revert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110738 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10Slightly revised handling of mult-alt constraints, to avoid an assert, until ↵John Thompson
we have the full fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110706 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10Do not use DIGlobalVariable to emit debugging information for enums.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110697 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10Even if a constant's evaluated value is used, emit debug info for the ↵Devang Patel
constant variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110660 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10Make replicate intrinsics use shufflevector instead of dup builtins, also ↵Bruno Cardoso Lopes
remove the dup builtins git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110646 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10There is no need to pubish file static variable's name. Do not rely on this ↵Devang Patel
code gen bug to check whether debug info is generated for such variables or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-08Thread local variables aren't considered common linkage.Eric Christopher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110530 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-07Correct -ftrapv to trap on errors, instead of calling theChris Lattner
__overflow_handler entrypoint that David Chisnall made up. Calling __overflow_handler is not part of the contract of -ftrapv provided by GCC, and should never have been checked in in the first place. According to: http://permalink.gmane.org/gmane.comp.compilers.clang.devel/8699 David is using this for some of arbitrary precision integer stuff or something, which is not an appropriate thing to implement on this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110490 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06Prevent these tests from dirtying the tree with output files that aren't evenChandler Carruth
used for the test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110431 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05We don't want to support built-ins which aren't needed by the intrinsics. ↵Bruno Cardoso Lopes
Remove them git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110399 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05Fix a major bug with -ftrapv and ++/--. Patch by David Keaton!John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110347 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05Tests for #pragma GCC visibility.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110316 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04Add more AVX 256-bit intrinsics and test cases for themBruno Cardoso Lopes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110178 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03Fix a warning on a test.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110165 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03Do a very simple pass over every function we emit to infer whether we canJohn McCall
mark it nounwind based on whether it contains any non-nounwind calls. <rdar://problem/8087431> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110163 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03Support x86 AVX 256-bit instructions built-ins. Right now support all of ↵Bruno Cardoso Lopes
them, but as soon as we properly codegen the simple vector operations, remove the unnecessary built-ins/intrinsics from clang and llvm. Also add tests for the new built-ins git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110096 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-01Only run the jump-checker if there's a branch-protected scope *and* there'sJohn McCall
a switch or goto somewhere in the function. Indirect gotos trigger the jump-checker regardless, because the conditions there are slightly more elaborate and it's too marginal a case to be worth optimizing. Turns off the jump-checker in a lot of cases in C++. rdar://problem/7702918 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109962 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30There is no reason for this test to invoke 'llc'.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109847 91177308-0d34-0410-b5e6-96231b3b80d8