- Jun 09, 2014
-
-
Andrea Di Biagio authored
This patch teaches the backend how to check for the 'NoSignedWrap' flag on binary operations to improve the emission of 'test' instructions. If the result of a binary operation is known not to overflow we know that resetting the Overflow flag is unnecessary and so we can avoid emitting the test instruction. Patch by Marcello Maggioni. llvm-svn: 210468
-
Andrea Di Biagio authored
This patch modifies SelectionDAGBuilder to construct SDNodes with associated NoSignedWrap, NoUnsignedWrap and Exact flags coming from IR BinaryOperator instructions. Added a new SDNode type called 'BinaryWithFlagsSDNode' to allow accessing nsw/nuw/exact flags during codegen. Patch by Marcello Maggioni. llvm-svn: 210467
-
Alexey Volkov authored
According to Intel Software Optimization Manual on Silvermont INC or DEC instructions require an additional uop to merge the flags. As a result, a branch instruction depending on an INC or a DEC instruction incurs a 1 cycle penalty. Differential Revision: http://reviews.llvm.org/D3990 llvm-svn: 210466
-
Evgeniy Stepanov authored
llvm-svn: 210465
-
Artyom Skrobov authored
llvm-svn: 210464
-
Evgeniy Stepanov authored
This should fix strtoimax/strtoumax on newer glibc. https://code.google.com/p/memory-sanitizer/issues/detail?id=36 llvm-svn: 210463
-
Jeroen Ketema authored
llvm-svn: 210462
-
Rui Ueyama authored
llvm-svn: 210461
-
Zoran Jovanovic authored
Differential Revision: http://reviews.llvm.org/D3822 llvm-svn: 210460
-
Evgeniy Stepanov authored
Instructions from __nodebug__ functions don't have file:line information even when inlined into no-nodebug functions. As a result, intrinsics (SSE and other) from <*intrin.h> clang headers _never_ have file:line information. With this change, an instruction without !dbg metadata gets one from the call instruction when inlined. Fixes PR19001. llvm-svn: 210459
-
Evgeniy Stepanov authored
llvm-svn: 210458
-
Evgeniy Stepanov authored
llvm-svn: 210457
-
Rui Ueyama authored
llvm-svn: 210456
-
Rui Ueyama authored
llvm-svn: 210455
-
Evgeniy Stepanov authored
This fixes a crash on MMX intrinsics, as well as a corner case in handling of all unsigned pack intrinsics. PR19953. llvm-svn: 210454
-
Matt Arsenault authored
llvm-svn: 210453
-
Evgeniy Stepanov authored
llvm-svn: 210452
-
Rui Ueyama authored
This reverts commit r210425 because the test added in the commit is broken. llvm-svn: 210451
-
Patrik Hagglund authored
llvm-svn: 210450
-
Bill Schmidt authored
The PowerPC vsumsws instruction, accessed via vec_sums, is defined architecturally with a big-endian bias, in that the second input vector and the result always reference big-endian element 3 (little-endian element 0). For ease of porting, the programmer wants elements 3 in both cases. To provide this semantics, for little endian we generate a permute for the second input vector prior to the vsumsws instruction, and generate a permute for the result vector following the vsumsws instruction. The correctness of this code is tested by the new sums.c test added in a previous patch, as well as the modifications to builtins-ppc-altivec.c in the present patch. llvm-svn: 210449
-
Craig Topper authored
llvm-svn: 210448
-
Craig Topper authored
llvm-svn: 210447
-
Chad Rosier authored
Patch by Dave Estes <cestes@codeaurora.org> http://reviews.llvm.org/D4037 llvm-svn: 210446
-
Chad Rosier authored
plus add. The shift can be folded into the add. This only effects codegen when the constant is 3. llvm-svn: 210445
-
Jingyue Wu authored
For each array index that is in the form of zext(a), convert it to sext(a) if we can prove zext(a) <= max signed value of typeof(a). The conversion helps to split zext(x + y) into sext(x) + sext(y). Reviewed in http://reviews.llvm.org/D4060 llvm-svn: 210444
-
NAKAMURA Takumi authored
llvm-svn: 210443
-
Craig Topper authored
llvm-svn: 210442
-
Joey Gouly authored
This uncovered something strange. Diagnostics for InlineAsm have source locations that don't really map to where they are within the .c source file. llvm-svn: 210440
-
Jingyue Wu authored
zext(a + b) != zext(a) + zext(b) even if a + b >= 0 && b >= 0. e.g., a = i4 0b1111, b = i4 0b0001 zext a + b to i8 = zext 0b0000 to i8 = 0b00000000 (zext a to i8) + (zext b to i8) = 0b00001111 + 0b00000001 = 0b00010000 llvm-svn: 210439
-
Jingyue Wu authored
No functionality changes. llvm-svn: 210438
-
Jingyue Wu authored
inbounds are not necessary in these two tests. zext(a +nuw b) = zext(a) + zext(b) should hold with or without inbounds. llvm-svn: 210437
-
David Blaikie authored
To test cases that involve actual repetition (> 1 elements), at least one element before the insertion point, and some elements of the original range that still fit in that range space after insertion. Actually we need coverage for the inverse case too (where no elements after the insertion point fit into the previously allocated space), but this'll do for now, and I might end up rewriting bits of SmallVector to avoid that special case anyway. llvm-svn: 210436
-
Tobias Grosser authored
Before, we where looking at the size of the pointer type that specifies the location from which to load the element. This did not make any sense at all. This change fixes a bug in the delinearization where we failed to delinerize certain load instructions. llvm-svn: 210435
-
David Blaikie authored
SmallVector: More movable improvements - don't copy elements to make space when inserting repeated elements. Also split and improve tests a bit. llvm-svn: 210433
-
David Blaikie authored
llvm-svn: 210432
-
Saleem Abdulrasool authored
X86Subtarget::isTargetCygMing || X86Subtarget::isTargetKnownWindowsMSVC is equivalent to all Windows environments. Simplify the check to isOSWindows. NFC. llvm-svn: 210431
-
David Blaikie authored
SmallVectorTest: Remove some more robust checks added in r210429 since they caught some bugs I haven't fixed yet. Specifically this caused inserting an element from a SmallVector into itself when such an insertion would cause a reallocation. We have code to handle this for non-reallocating cases, but it's not robust against reallocation. llvm-svn: 210430
-
David Blaikie authored
(& because it makes it easier to test, this also improves correctness/performance slightly by moving the last element in an insert operation, rather than copying it) llvm-svn: 210429
-
Stephen Canon authored
Because we don't have a separate negate( ) function, 0 - NaN does double-duty as the IEEE-754 negate( ) operation, which (unlike most FP ops) *does* attach semantic meaning to the signbit of NaN. llvm-svn: 210428
-
David Blaikie authored
I saw at least a memory leak or two from inspection (on probably untested error paths) and r206991, which was the original inspiration for this change. I ran this idea by Jim Grosbach a few weeks ago & he was OK with it. Since it's a basically mechanical patch that seemed sufficient - usual post-commit review, revert, etc, as needed. llvm-svn: 210427
-