- Aug 27, 2010
-
-
Owen Anderson authored
llvm-svn: 112286
-
Chris Lattner authored
computation can be truncated if it is fed by a sext/zext that doesn't have to be exactly equal to the truncation result type. llvm-svn: 112285
-
Dan Gohman authored
to DenseMap. llvm-svn: 112281
-
Chris Lattner authored
by the SRoA "promote to large integer" code, eliminating some type conversions like this: %94 = zext i16 %93 to i32 ; <i32> [#uses=2] %96 = lshr i32 %94, 8 ; <i32> [#uses=1] %101 = trunc i32 %96 to i8 ; <i8> [#uses=1] This also unblocks other xforms from happening, now clang is able to compile: struct S { float A, B, C, D; }; float foo(struct S A) { return A.A + A.B+A.C+A.D; } into: _foo: ## @foo ## BB#0: ## %entry pshufd $1, %xmm0, %xmm2 addss %xmm0, %xmm2 movdqa %xmm1, %xmm3 addss %xmm2, %xmm3 pshufd $1, %xmm1, %xmm0 addss %xmm3, %xmm0 ret on x86-64, instead of: _foo: ## @foo ## BB#0: ## %entry movd %xmm0, %rax shrq $32, %rax movd %eax, %xmm2 addss %xmm0, %xmm2 movapd %xmm1, %xmm3 addss %xmm2, %xmm3 movd %xmm1, %rax shrq $32, %rax movd %eax, %xmm0 addss %xmm3, %xmm0 ret This seems pretty close to optimal to me, at least without using horizontal adds. This also triggers in lots of other code, including SPEC. llvm-svn: 112278
-
Bob Wilson authored
Update all the tests using those intrinsics and add support for auto-upgrading bitcode files with the old versions of the intrinsics. llvm-svn: 112271
-
Owen Anderson authored
Use LVI to eliminate conditional branches where we've tested a related condition previously. Update tests for this change. This fixes PR5652. llvm-svn: 112270
-
Dan Gohman authored
return to avoid needing two calls to test for equivalence, and sort addrecs by their degree before examining their operands. llvm-svn: 112267
-
Anton Korobeynikov authored
value should be copied to the corresponding shadow reg as well. Patch by Cameron Esfahani! llvm-svn: 112262
-
Benjamin Kramer authored
llvm-svn: 112260
-
Benjamin Kramer authored
llvm-svn: 112259
-
Daniel Dunbar authored
X86: Fix an encoding issue with LOCK_ADD64mr, which could lead to very hard to find miscompiles with the integrated assembler. llvm-svn: 112250
-
Devang Patel authored
llvm-svn: 112242
-
Jim Grosbach authored
to try to re-use scavenged frame index reference registers. rdar://8277890 llvm-svn: 112241
-
Devang Patel authored
llvm-svn: 112238
-
Jim Grosbach authored
virtual base registers handle this function, and more. A bit more cleanup to do on the interface to eliminateFrameIndex() after this. llvm-svn: 112237
-
Chris Lattner authored
by SRoA. This is part of rdar://7892780, but needs another xform to expose this. llvm-svn: 112232
-
- Aug 26, 2010
-
-
Jim Grosbach authored
llvm-svn: 112228
-
Chris Lattner authored
is a vector to be a vector element extraction. This allows clang to compile: struct S { float A, B, C, D; }; float foo(struct S A) { return A.A + A.B+A.C+A.D; } into: _foo: ## @foo ## BB#0: ## %entry movd %xmm0, %rax shrq $32, %rax movd %eax, %xmm2 addss %xmm0, %xmm2 movapd %xmm1, %xmm3 addss %xmm2, %xmm3 movd %xmm1, %rax shrq $32, %rax movd %eax, %xmm0 addss %xmm3, %xmm0 ret instead of: _foo: ## @foo ## BB#0: ## %entry movd %xmm0, %rax movd %eax, %xmm0 shrq $32, %rax movd %eax, %xmm2 addss %xmm0, %xmm2 movd %xmm1, %rax movd %eax, %xmm1 addss %xmm2, %xmm1 shrq $32, %rax movd %eax, %xmm0 addss %xmm1, %xmm0 ret ... eliminating half of the horribleness. llvm-svn: 112227
-
Jim Grosbach authored
still having a significant effect. It shouldn't be now that the pre-RA virtual base reg stuff is in. Assuming that's valididated by the nightly testers, we can simplify a lot of the PEI frame index code. llvm-svn: 112220
-
Bruno Cardoso Lopes authored
llvm-svn: 112218
-
Devang Patel authored
llvm-svn: 112216
-
Devang Patel authored
llvm-svn: 112215
-
Devang Patel authored
llvm-svn: 112213
-
Bob Wilson authored
llvm-svn: 112208
-
Devang Patel authored
Donot forget to resolve dangling debug info in a case where virtual register, used for a value, is initialized after a dbg intrinsic is seen. llvm-svn: 112207
-
Bill Wendling authored
llvm-svn: 112206
-
Benjamin Kramer authored
llvm-svn: 112203
-
Bob Wilson authored
llvm-svn: 112202
-
Owen Anderson authored
llvm-svn: 112198
-
Benjamin Kramer authored
llvm-svn: 112197
-
Jim Grosbach authored
encodable as a 16-bit wide instruction. llvm-svn: 112195
-
Dan Gohman authored
llvm-svn: 112191
-
Dan Gohman authored
fix: add a flag to MapValue and friends which indicates whether any module-level mappings are being made. In the common case of inlining, no module-level mappings are needed, so MapValue doesn't need to examine non-function-local metadata, which can be very expensive in the case of a large module with really deep metadata (e.g. a large C++ program compiled with -g). This flag is a little awkward; perhaps eventually it can be moved into the ClonedCodeInfo class. llvm-svn: 112190
-
Benjamin Kramer authored
llvm-svn: 112189
-
Benjamin Kramer authored
Do unsigned char comparisons in StringRef::compare_lower to be more consistent with compare in corner cases. llvm-svn: 112185
-
Bill Wendling authored
comparison with 0. These two pieces of code should give identical results: rsbs r1, r1, 0 cmp r0, r1 mov r0, #0 it ls mov r0, #1 and: cmn r0, r1 mov r0, #0 it ls mov r0, #1 However, the CMN gives the *opposite* result when r1 is 0. This is because the carry flag is set in the CMP case but not in the CMN case. In short, the CMP instruction doesn't perform a truncate of the (logical) NOT of 0 plus the value of r0 and the carry bit (because the "carry bit" parameter to AddWithCarry is defined as 1 in this case, the carry flag will always be set when r0 >= 0). The CMN instruction doesn't perform a NOT of 0 so there is never a "carry" when this AddWithCarry is performed (because the "carry bit" parameter to AddWithCarry is defined as 0). The AddWithCarry in the CMP case seems to be relying upon the identity: ~x + 1 = -x However when x is 0 and unsigned, this doesn't hold: x = 0 ~x = 0xFFFF FFFF ~x + 1 = 0x1 0000 0000 (-x = 0) != (0x1 0000 0000 = ~x + 1) Therefore, we should disable *all* versions of CMN, especially when comparing against zero, until we can limit when the CMN instruction is used (when we know that the RHS is not 0) or when we have a hardware fix for this. (See the ARM docs for the "AddWithCarry" pseudo-code.) This is related to <rdar://problem/7569620>. llvm-svn: 112176
-
Chris Lattner authored
llvm-svn: 112175
-
Chris Lattner authored
llvm-svn: 112171
-
Bob Wilson authored
llvm-svn: 112170
-
Chris Lattner authored
apparently try to support. llvm-svn: 112168
-