Fariborz Jahanian
5a866c0bf2
Ir-gen the side-effect(s) when __builtin_expect is
...
constant-folded. // rdar://9330105
llvm-svn: 130163
2011-04-25 22:30:02 +00:00
Bob Wilson
ee674fb73d
Workaround buildbot failure by hacking up this test to emit llvm IR.
...
This is not a real fix. It needs some checks to make sure the IR is correct.
llvm-svn: 130012
2011-04-22 20:42:46 +00:00
Justin Holewinski
bd4a3c03ff
PTX: Add default PTX calling conventions
...
llvm-svn: 129987
2011-04-22 11:10:38 +00:00
Bob Wilson
bf0cd6b83d
Add a testcase for svn r129964 (Neon load/store intrinsic alignments).
...
llvm-svn: 129979
2011-04-22 04:06:49 +00:00
John McCall
e0fda7377e
The 0.98 revision of the x86-64 ABI clarified a lot of things, some
...
of which break strict compatibility with previous compilers. Implement
one of them and then immediately opt out on Darwin.
llvm-svn: 129899
2011-04-21 01:20:55 +00:00
Chris Lattner
54fd1a1ad3
fix a crash on code that uses the result value of __builtin___memcpy_chk.
...
llvm-svn: 129892
2011-04-20 23:14:50 +00:00
Justin Holewinski
514cce8e43
PTX: Add PTX intrinsics as builtins and add ptx32 and ptx64 as valid architectures for triples, e.g. ptx32-unknown-unknown
...
llvm-svn: 129870
2011-04-20 19:34:15 +00:00
Chris Lattner
97bbee2fb4
Fix a miscompilation I introduced in r129652, thanks for Eli for tracking
...
it down. we effectively were compile the testcase into:
void test14(int x) {
switch (x) {
case 11: break;
case 42: test14(97); // fallthrough
default: test14(42); break;
which is not the same thing at all. This fixes a miscompilation of
MallocBench/gs seen on the clang-x86_64-linux-fnt buildbot.
llvm-svn: 129679
2011-04-17 23:21:26 +00:00
Chris Lattner
38b6057a93
when assertions are disabled, labels go away. Hopefully fixes the windows build.
...
llvm-svn: 129660
2011-04-17 16:19:57 +00:00
Chris Lattner
bc204c8043
implement rdar://9289524 - case followed immediately by break results in empty IR block,
...
a -O0 code quality issue.
llvm-svn: 129652
2011-04-17 00:54:30 +00:00
Chris Lattner
30107ed600
fold memcpy/set/move_chk to llvm.memcpy/set/move when the sizes
...
are trivial. This exposes opportunities earlier, and allows fastisel
to do good things with these at -O0.
This addresses rdar://9289468 - clang doesn't fold memset_chk at -O0
llvm-svn: 129651
2011-04-17 00:40:24 +00:00
Chris Lattner
56784f9de6
fix rdar://9289603 - clang should fold trivial ?: for enums as well as integer constants into select at -O0
...
by making the isCheapEnoughToEvaluateUnconditionally predicate handle anything that folds to a constant. In particular, we now fold enums.
llvm-svn: 129649
2011-04-16 23:15:35 +00:00
Michael J. Spencer
6826eb816a
Add 3DNow! Intrinsics.
...
llvm-svn: 129570
2011-04-15 15:07:13 +00:00
Chris Lattner
57540c5be0
fix a bunch of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129559
2011-04-15 05:22:18 +00:00
Anton Korobeynikov
231e875b5c
Implement ARM pcs attribute. Basically it's another way of calling convention selection (AAPCS or
...
AAPCS+VFP), similar to fastcall / stdcall / whatevercall seen on x86.
In particular, all library functions should always be AAPCS regardless of floating point ABI used.
llvm-svn: 129534
2011-04-14 20:06:49 +00:00
Bill Wendling
a865185ad6
Removing the unaligned load tests from builtins-x86.c since they're generated by a regular 'load' now.
...
llvm-svn: 129464
2011-04-13 20:17:22 +00:00
Eli Friedman
493c34a86c
PR9580: Handle vectors correctly in ScalarExprEmitter::EmitRem.
...
While I'm here, FileCheck-ize the ext-vector test, so we actually check
what it is generating.
llvm-svn: 129241
2011-04-10 04:44:11 +00:00
Eli Friedman
c5b20b5283
PR8369: make __attribute((regparm(0))) work correctly. Original patch by
...
pageexec@freemail.hu , tweaks by me.
llvm-svn: 129206
2011-04-09 08:18:08 +00:00
Chris Lattner
9cb59fa834
add a __sync_swap builtin to fill out the rest of the __sync builtins.
...
Patch by Dave Zarzycki!
llvm-svn: 129189
2011-04-09 03:57:26 +00:00
John McCall
26d365e149
I can't figure out any reasonable way to make this test non-host-dependent,
...
so I'm killing it.
llvm-svn: 129026
2011-04-06 20:46:42 +00:00
Peter Collingbourne
ba3e6667cc
Do not use IR marker for LLVM intrinsics
...
llvm-svn: 129001
2011-04-06 12:29:09 +00:00
John McCall
b1915d62a7
Make this a -cc1 test with a triple and a target feature.
...
llvm-svn: 128993
2011-04-06 06:48:04 +00:00
John McCall
3cacdf5dbb
Anonymify this test.
...
llvm-svn: 128987
2011-04-06 04:29:52 +00:00
John McCall
91a528841b
Implement the AVX cmp builtins as macros instead of static inlines.
...
Patch by Syoyo Fujita! Reviewed by Chris Lattner! Checked in by me!
llvm-svn: 128984
2011-04-06 03:37:51 +00:00
Daniel Dunbar
826342774e
IRgen: Reapply r128691 with a fix to ensure we don't increase alignment past
...
that of the array element type.
llvm-svn: 128698
2011-04-01 00:49:43 +00:00
Daniel Dunbar
ea6b81a2ad
Revert r128691, "IRgen: Improve GCC compatibility when dealing with packed
...
arrays by propagating", it's breaking test in ways I don't understand yet.
llvm-svn: 128693
2011-04-01 00:13:33 +00:00
Daniel Dunbar
417bf0f147
IRgen: Improve GCC compatibility when dealing with packed arrays by propagating
...
the array alignment to the array access.
- This is more or less the best we can do without having alignment present in
the type system, but is a long way from truly matching how GCC handles this.
llvm-svn: 128691
2011-03-31 23:32:15 +00:00
Devang Patel
adc35e28fc
Robustify test string.
...
llvm-svn: 128486
2011-03-29 21:06:43 +00:00
Devang Patel
298ecb3aaf
Add target triple.
...
llvm-svn: 128480
2011-03-29 20:00:06 +00:00
Devang Patel
6f2e41e0d4
Do not line number entry for unconditional branches. Usually, users do not want to stop at closing '}'.
...
llvm-svn: 128471
2011-03-29 18:35:54 +00:00
Anton Yartsev
28ccef788b
supported: AltiVec vector initialization with a single literal according to PIM section 2.5.1 - after initialization all elements have the value specified by the literal
...
llvm-svn: 128375
2011-03-27 09:32:40 +00:00
Douglas Gregor
1baf38f5a6
On Mac OS X, the presence of an 'availability' attribute for that
...
platform implies default visibility. To achieve these, refactor our
lookup of explicit visibility so that we search for both an explicit
VisibilityAttr and an appropriate AvailabilityAttr, favoring the
VisibilityAttr if it is present.
llvm-svn: 128336
2011-03-26 12:10:19 +00:00
John Thompson
88903beaf5
Fixed some of the incompatibilities with gcc.
...
llvm-svn: 128228
2011-03-24 18:51:57 +00:00
Eli Friedman
b4d3c99929
Make sure we aggressively attach nounwind (etc.) to calls to library
...
functions of the form __builtin_XXX.
llvm-svn: 128198
2011-03-24 05:09:45 +00:00
Rafael Espindola
0c1f098284
Switch from internal to linker_private linkage, it is sufficient to please the new linker.
...
llvm-svn: 127622
2011-03-14 21:08:19 +00:00
Eric Christopher
cf5e83b471
__clear_cache() is varargs and people will occasionally write it without
...
arguments. Process only the arguments that people write, but process
all of them.
Fixes rdar://8900346
llvm-svn: 127616
2011-03-14 20:30:34 +00:00
Rafael Espindola
7a6cf01895
Fix link of libxul with LTO and the linker in xcode4. It is not clear if this
...
is working around a bug in ld or if the new linker has a reasonable reason
for wanting the string constant to be linker visible.
llvm-svn: 127594
2011-03-14 17:55:00 +00:00
Bill Wendling
ec9d2633f1
When we adjust the inline ASM type, we need to take into account an early
...
clobber with the 'y' constraint. Otherwise, we get the wrong return type and an
assert, because it created a '<1 x i64>' vector type instead of the x86_mmx
type.
llvm-svn: 127185
2011-03-07 22:47:14 +00:00
Douglas Gregor
19da4e4397
Revert r126422 "Use private linkage to avoid symbol conflicts in
...
corner cases like the one in PR9301." which caused PR9416.
llvm-svn: 127136
2011-03-06 23:28:21 +00:00
NAKAMURA Takumi
98835748e3
test/CodeGen/2008-07-17-no-emit-on-error.c: Use LLVM's opt instead of "test(1)" for Mingw MSYS.
...
Mingw MSYS does not have test.exe (only shell built-in test), and is not capable to invoke test(1) from utils/not.
llvm-svn: 127078
2011-03-05 11:15:55 +00:00
Benjamin Kramer
0f074df979
Only emit string initializers in-place if types match. Fixes PR9373.
...
llvm-svn: 126883
2011-03-02 21:27:44 +00:00
Eli Friedman
846ded2e53
PR9350: increment/decrement of char (and anything else narrower than int)
...
can't overflow due to promotion rules; emit a wrapping add for those cases.
llvm-svn: 126816
2011-03-02 01:49:12 +00:00
Douglas Gregor
1bbd2d2ece
Kill off more names to fix this test
...
llvm-svn: 126775
2011-03-01 19:55:40 +00:00
Roman Divacky
5e1af659e9
Fix the test.
...
llvm-svn: 126768
2011-03-01 18:50:59 +00:00
Roman Divacky
65b88cdb3b
Implement -mrtd which sets the StdCall calling convention to be the default
...
one.
llvm-svn: 126756
2011-03-01 17:40:53 +00:00
Chris Lattner
2e72da947c
-fwrapv should turn off the inbounds markers from geps used for pointer
...
arithmetic. This is part of PR9256, it would be great if someone else
wired up -fno-strict-overflow in the driver to -fwrapv.
llvm-svn: 126718
2011-03-01 00:03:48 +00:00
Chris Lattner
35d3ac5e9e
Make skipping of vardecls more precise: it's ok to skip a decl if the entire
...
compound stmt containing the decl is skipped.
llvm-svn: 126639
2011-02-28 07:22:44 +00:00
Chris Lattner
62208c395a
make switch constant folding a bit stronger, handling a missed case.
...
llvm-svn: 126638
2011-02-28 07:16:14 +00:00
Ken Dyck
1b4420ed42
Retry r126357. Use CharUnits for the Size and DataSize calculations when
...
they are known to be exact multiples of the width of the char type. Add a
test case to CodeGen/union.c that would have caught the problem with the
previous attempt. No change in functionality intended.
llvm-svn: 126628
2011-02-28 02:01:38 +00:00
Chris Lattner
dc2cc67e57
remove a bogus assertion, add a comment.
...
llvm-svn: 126603
2011-02-28 01:06:02 +00:00