- Jul 01, 2013
-
-
Arnold Schwaighofer authored
Math functions are mark as readonly because they read the floating point rounding mode. Because we don't vectorize loops that would contain function calls that set the rounding mode it is safe to ignore this memory read. llvm-svn: 185299
-
- Jun 30, 2013
-
-
Vincent Lejeune authored
llvm-svn: 185294
-
Ahmed Bougacha authored
llvm-svn: 185292
-
Stephen Lin authored
DeadArgumentElimination: keep return value on functions that have a live argument with the 'returned' attribute (rather than generate invalid IR); however, if both can be eliminated, both will be llvm-svn: 185290
-
Benjamin Kramer authored
ConstantFold: Check that truncating the other side is safe under a sext when trying to remove a sext from a compare. Fixes PR16462. llvm-svn: 185284
-
David Majnemer authored
This allows us to simplify urem instructions involving the add+xor to turn into simpler math. llvm-svn: 185272
-
Benjamin Kramer authored
Avoids unused variable warnings in release builds. llvm-svn: 185271
-
- Jun 29, 2013
-
-
Benjamin Kramer authored
Inserting a zext or trunc is sufficient. This pattern is somewhat common in LLVM's pointer mangling code. llvm-svn: 185270
-
Benjamin Kramer authored
operator++ on an enum is not legal. clang happens to accept it anyways, I think that's a known bug. llvm-svn: 185269
-
Vincent Lejeune authored
llvm-svn: 185268
-
Vincent Lejeune authored
llvm-svn: 185267
-
Benjamin Kramer authored
llvm-svn: 185266
-
Benjamin Kramer authored
llvm-svn: 185263
-
Benjamin Kramer authored
llvm-svn: 185262
-
David Majnemer authored
Changing the sign when comparing the base pointer would introduce all sorts of unexpected things like: %gep.i = getelementptr inbounds [1 x i8]* %a, i32 0, i32 0 %gep2.i = getelementptr inbounds [1 x i8]* %b, i32 0, i32 0 %cmp.i = icmp ult i8* %gep.i, %gep2.i %cmp.i1 = icmp ult [1 x i8]* %a, %b %cmp = icmp ne i1 %cmp.i, %cmp.i1 ret i1 %cmp into: %cmp.i = icmp slt [1 x i8]* %a, %b %cmp.i1 = icmp ult [1 x i8]* %a, %b %cmp = xor i1 %cmp.i, %cmp.i1 ret i1 %cmp By preserving the original sign, we now get: ret i1 false This fixes PR16483. llvm-svn: 185259
-
David Majnemer authored
llvm-svn: 185258
-
David Majnemer authored
Real world code sometimes has the denominator of a 'udiv' be a 'select'. LLVM can handle such cases but only when the 'select' operands are symmetric in structure (both select operands are a constant power of two or a left shift, etc.). This falls apart if we are dealt a 'udiv' where the code is not symetric or if the select operands lead us to more select instructions. Instead, we should treat the LHS and each select operand as a distinct divide operation and try to optimize them independently. If we can to simplify each operation, then we can replace the 'udiv' with, say, a 'lshr' that has a new select with a bunch of new operands for the select. llvm-svn: 185257
-
Nadav Rotem authored
llvm-svn: 185251
-
Nadav Rotem authored
llvm-svn: 185250
-
Manman Ren authored
No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. For cases where we know the type of a DI metadata, use assert. llvm-svn: 185249
-
Richard Trieu authored
llvm-svn: 185243
-
David Majnemer authored
We may, after other optimizations, find ourselves with IR that looks like: %shl = shl i32 1, %y %cmp = icmp ult i32 %shl, 32 Instead, we should just compare the shift count: %cmp = icmp ult i32 %y, 5 llvm-svn: 185242
-
Preston Briggs authored
llvm-svn: 185241
-
Matt Arsenault authored
Thename says it's an i32*, but it was actually creating another i8* llvm-svn: 185239
-
Matt Arsenault authored
llvm-svn: 185238
-
Jakob Stoklund Olesen authored
llvm-svn: 185237
-
Jakob Stoklund Olesen authored
Allow block frequencies to exceed 32 bits by using the new BlockFrequency division function. llvm-svn: 185236
-
Hal Finkel authored
This fixes PR16418, which reports that a function calling __builtin_unwind_init() asserts. The cause is that this generates a spill/restore for VRSAVE, and we support that only on Darwin (because VRSAVE is only really used on Darwin). The test case checks only that we don't crash. We can add correctness checks once someone verifies what behavior the function is supposed to have. llvm-svn: 185235
-
Daniel Malea authored
- should resolve windows buildbot failure llvm-svn: 185232
-
Nadav Rotem authored
To support this we have to insert 'extractelement' instructions to pick the right lane. We had this functionality before but I removed it when we moved to the multi-block design because it was too complicated. llvm-svn: 185230
-
- Jun 28, 2013
-
-
Richard Trieu authored
Change assert("text") to assert(0 && "text"). The first case is a const char * to bool conversion, which always evaluates to true, never triggering the assert. The second case will always trigger the assert. llvm-svn: 185227
-
Jakob Stoklund Olesen authored
llvm-svn: 185226
-
Daniel Malea authored
- mistakenly used get_current_dir() linux function - replaced with getcwd/_getcwd as appropriate for current platform llvm-svn: 185225
-
Andrew Kaylor authored
Revising the MCJIT ObjectCache interface to allow subclasses to avoid retaining references to returned objects llvm-svn: 185221
-
David Blaikie authored
llvm-svn: 185219
-
Jakob Stoklund Olesen authored
Hopefully, this fixes the PPC64 buildbots. llvm-svn: 185218
-
Nadav Rotem authored
In this code we keep track of pointers that we are allowed to read from, if they are accessed by non-predicated blocks. We use this list to allow vectorization of conditional loads in predicated blocks because we know that these addresses don't segfault. llvm-svn: 185214
-
Daniel Malea authored
- lit tests verify that each line of input LLVM IR gets a !dbg node and a corresponding entry of metadata that contains the line number - unit tests verify that DebugIR works as advertised in the interface - refactored some useful IR generation functionality from the MCJIT unit tests so it can be reused llvm-svn: 185212
-
Tom Stellard authored
Patch By: Alex Deucher Reviewed-by:
Tom Stellard <thomas.stellard@amd.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> llvm-svn: 185209
-
Hal Finkel authored
On OpenBSD, the stack-smash protection transform uses "__guard_local" and "__stack_smash_handler" instead of "__stack_chk_guard" and "__stack_chk_fail". However, CodeGen/PowerPC/stack-protector.ll doesn't specify a target OS, so on OpenBSD it fails. Add -mtriple=ppc32-unknown-linux to make the test host-OS agnostic. While there, convert to FileCheck. Patch by Matthew Dempsky. llvm-svn: 185206
-