summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* LLVMSymbolize.cpp: Fix build. Triple::ArchType is not a namespace.NAKAMURA Takumi2013-07-171-1/+1
| | | | llvm-svn: 186494
* llvm-symbolizer: be more careful with colons in file namesAlexey Samsonov2013-07-171-8/+7
| | | | llvm-svn: 186493
* Make x86 fast-isel correctly choose between aligned and unaligned operations ↵Craig Topper2013-07-174-31/+77
| | | | | | for vector stores. Fixes PR16640. llvm-svn: 186491
* Fix ARMFastISel::ARMEmitIntExt shift emissionJF Bastien2013-07-171-30/+52
| | | | | | | | My patch 'r183551 - ARM FastISel integer sext/zext improvements' was incorrect when emitting ARM register-immediate ASR, LSL, LSR instructions: they are pseudo-instructions in ARMInstrInfo.td and I should have used MOVsi instead. This is not an issue when code is generated through a .s file, but is an issue when generated straight to a .o (-filetype=obj). llvm-svn: 186489
* PPC: Add CTR-register clobber to builtin setjmpHal Finkel2013-07-174-0/+59
| | | | | | | | | | | | | Because the builtin longjmp implementation uses a CTR-based indirect jump, when the control flow arrives at the builtin setjmp call, the CTR register has necessarily been clobbered. Correspondingly, this adds CTR to the list of implicit definitions of the builtin setjmp pseudo instruction. We don't need to add CTR to the implicit definitions of builtin longjmp because, even though it does clobber the CTR register, the control flow cannot return to inside the loop unless there is also a builtin setjmp call. llvm-svn: 186488
* Add simpler version of is_directory. It will be used in clang.Rafael Espindola2013-07-171-0/+7
| | | | llvm-svn: 186486
* Mark a method 'const' and another 'static'.Craig Topper2013-07-171-2/+2
| | | | llvm-svn: 186485
* Make a few more static string pointers constant.Craig Topper2013-07-171-8/+8
| | | | llvm-svn: 186484
* Don't fallback to copy + delete in rename.Rafael Espindola2013-07-171-11/+2
| | | | | | | | | Rename's documentation says "Files are renamed as if by POSIX rename()". and it is used for atomically updating output files from a temporary. Having rename fallback to a non atomic copy has the potential to hide bugs, like using a temporary file in /tmp instead of a unique name next to the final destination. llvm-svn: 186483
* Make constant string pointer into an array to remove a pointer lookup for ↵Craig Topper2013-07-172-2/+2
| | | | | | every access. llvm-svn: 186482
* raw_ostream.cpp: Introduce <fcntl.h> to let O_BINARY provided. Or, ↵NAKAMURA Takumi2013-07-172-3/+5
| | | | | | | | llvm::outs() would be set to O_TEXT by default. llvm/test/Object/check_binary_output.ll is expected to pass on win32. llvm-svn: 186480
* SLPVectorizer: Accelerate the isConsecutive check by replacing the ↵Nadav Rotem2013-07-171-10/+5
| | | | | | subtraction of the two values with a simple SCEV expression that adds the offset to one of the pointers that we compare. llvm-svn: 186479
* PPC: Implement base pointer and stack realignmentHal Finkel2013-07-176-41/+391
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This builds on some frame-lowering code that has existed since 2005 (r24224) but was disabled in 2008 (r48188) because it needed base pointer support to function correctly. This implementation follows the strategy suggested by Dale Johannesen in r48188 where the following comment was added: This does not currently work, because the delta between old and new stack pointers is added to offsets that reference incoming parameters after the prolog is generated, and the code that does that doesn't handle a variable delta. You don't want to do that anyway; a better approach is to reserve another register that retains to the incoming stack pointer, and reference parameters relative to that. And now we do exactly that. If we don't need a frame pointer, then we use r31 as a base pointer. If we do need a frame pointer, then we use r30 as a base pointer. The base pointer retains the value of the stack pointer before it was decremented in the prologue. We then use the base pointer to resolve all negative frame indicies. The basic scheme follows that for base pointers in the X86 backend. We use a base pointer when we need to dynamically realign the incoming stack pointer. This currently applies only to static objects (dynamic allocas with large alignments, and base-pointer support in SjLj lowering will come in future commits). llvm-svn: 186478
* llvm/test/CodeGen/X86/vec_setcc.ll: Add explicit ↵NAKAMURA Takumi2013-07-171-3/+3
| | | | | | -mtriple=x86_64-unknown-unknown to satisfy win32-targeted configuration. llvm-svn: 186477
* Move string pointer from being a static class member to just a static global ↵Craig Topper2013-07-172-7/+2
| | | | | | in the one file its needed in. llvm-svn: 186476
* Add getModuleFlag(StringRef Key) to query a module flag given Key.Manman Ren2013-07-163-11/+21
| | | | | | No functionality change. llvm-svn: 186470
* llvm/test/Object/ar-create.test: Relax a CHECK line to satisfy localized ↵NAKAMURA Takumi2013-07-161-1/+1
| | | | | | | | message catalogue. For example, 'No such file or directory' cannot be seen on Japanese version of msvcrt. llvm-svn: 186469
* llvm/test/Object/check_binary_output.ll: Mark it as XFAIL on Windows. ↵NAKAMURA Takumi2013-07-161-0/+3
| | | | | | Investigating. llvm-svn: 186468
* flip the scev minus direction to simplify the code.Nadav Rotem2013-07-161-3/+3
| | | | llvm-svn: 186466
* SLPVectorizer: Improve the compile time of isConsecutive by adding a simple ↵Nadav Rotem2013-07-161-0/+18
| | | | | | | | constant-gep check before using SCEV. This check does not always work because not all of the GEPs use a constant offset, but it happens often enough to reduce the number of times we use SCEV. llvm-svn: 186465
* Related to r181161 - Indirect branches may not be the last branch in a basicLang Hames2013-07-161-0/+7
| | | | | | | | | | | | block. Blocks that have an indirect branch terminator, even if it's not the last terminator, should still be treated as unanalyzable. <rdar://problem/14437274> Reducing a useful regression test case is proving difficult - I hope to have one soon. llvm-svn: 186461
* ARM: Add support for the Thumb2 PLI alternate literal form.Tilmann Scheller2013-07-162-0/+7
| | | | | | | | | | This adds an instruction alias to make the assembler recognize the alternate literal form: pli [PC, #+/-<imm>] See A8.8.129 in the ARM ARM (DDI 0406C.b). Fixes <rdar://problem/14403733>. llvm-svn: 186459
* Update the examples for an API change.Rafael Espindola2013-07-161-1/+1
| | | | llvm-svn: 186453
* Add a wrapper for open.Rafael Espindola2013-07-1627-119/+130
| | | | | | | This centralizes the handling of O_BINARY and opens the way for hiding more differences (like how open behaves with directories). llvm-svn: 186447
* Finally, force the target for this test. Should unbreak non-x86 buildbots.Benjamin Kramer2013-07-161-3/+3
| | | | llvm-svn: 186445
* XFAIL this test on mingw.Rafael Espindola2013-07-161-0/+1
| | | | llvm-svn: 186444
* Label names also differ between platforms. Use a relaxed regex.Benjamin Kramer2013-07-161-4/+4
| | | | llvm-svn: 186442
* Fix test not to fail when the target doesn't use leading underscores on symbols.Benjamin Kramer2013-07-161-18/+18
| | | | llvm-svn: 186439
* Cleanup testing case by using a shorter name for types.Manman Ren2013-07-161-39/+39
| | | | llvm-svn: 186436
* Remove floats from live range splitting costs.Jakob Stoklund Olesen2013-07-162-26/+28
| | | | | | | | | | These floats all represented block frequencies anyway, so just use the BlockFrequency class directly. Some floating point computations remain in tryLocalSplit(). They are estimating spill weights which are still floats. llvm-svn: 186435
* Reapply r185393.Jakob Stoklund Olesen2013-07-162-82/+80
| | | | | | | | | | | | | | | | | | | | | | Original commit message: Remove floating point computations from SpillPlacement.cpp. Patch by Benjamin Kramer! Use the BlockFrequency class instead of floats in the Hopfield network computations. This rescales the node Bias field from a [-2;2] float range to two block frequencies BiasN and BiasP pulling in opposite directions. This construct has a more predictable behavior when block frequencies saturate. The per-node scaling factors are no longer necessary, assuming the block frequencies around a bundle are consistent. This patch can cause the register allocator to make different spilling decisions. The differences should be small. llvm-svn: 186434
* [X86] Use min/max to optimze unsigend vector comparison on X86Juergen Ributzka2013-07-162-2/+148
| | | | | | | | | | | | | Use PMIN/PMAX for UGE/ULE vector comparions to reduce the number of required instructions. This trick also works for UGT/ULT, but there is no advantage in doing so. It wouldn't reduce the number of instructions and it would actually reduce performance. Reviewer: Ben radar:5972691 llvm-svn: 186432
* Make SpecialCaseList match full strings, as documented, using anchors.Peter Collingbourne2013-07-162-1/+17
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1149 llvm-svn: 186431
* Test commit to verify write access.Juergen Ributzka2013-07-161-0/+1
| | | | llvm-svn: 186429
* [Support] Add a Unicode conversion wrapper from UTF16 to UTF8Reid Kleckner2013-07-164-2/+143
| | | | | | | | | | | This is to support parsing UTF16 response files in LLVM/lib/Option for lld and clang. Reviewers: hans Differential Revision: http://llvm-reviews.chandlerc.com/D1138 llvm-svn: 186426
* When the inliner merges allocas, it must keep the larger alignmentHal Finkel2013-07-163-2/+203
| | | | | | | | | | | | For safety, the inliner cannot decrease the allignment on an alloca when merging it with another. I've included two variants of the test case for this: one with DataLayout available, and one without. When DataLayout is not available, if only one of the allocas uses the default alignment (getAlignment() == 0), then they cannot be safely merged. llvm-svn: 186425
* On error, close the temporary file descriptor.Rafael Espindola2013-07-162-1/+12
| | | | | | With this change llvm-ar can remove the temporary file on windows too. llvm-svn: 186423
* SLPVectorizer: Reduce the compile time of the consecutive store lookup.Nadav Rotem2013-07-161-5/+13
| | | | | | Process groups of stores in chunks of 16. llvm-svn: 186420
* Create files with mode 666. This matches the behavior of other unix tools.Rafael Espindola2013-07-162-1/+14
| | | | llvm-svn: 186414
* [Support] Fix some warnings when self-hosting clang on WindowsReid Kleckner2013-07-162-2/+5
| | | | llvm-svn: 186413
* [APFloat] PR16573: Avoid losing mantissa bits in ppc_fp128 to double truncationUlrich Weigand2013-07-162-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When truncating to a format with fewer mantissa bits, APFloat::convert will perform a right shift of the mantissa by the difference of the precision of the two formats. Usually, this will result in just the mantissa bits needed for the target format. One special situation is if the input number is denormal. In this case, the right shift may discard significant bits. This is usually not a problem, since truncating a denormal usually results in zero (underflow) after normalization anyway, since the result format's exponent range is usually smaller than the target format's. However, there is one case where the latter property does not hold: when truncating from ppc_fp128 to double. In particular, truncating a ppc_fp128 whose first double of the pair is denormal should result in just that first double, not zero. The current code however performs an excessive right shift, resulting in lost result bits. This is then caught in the APFloat::normalize call performed by APFloat::convert and causes an assertion failure. This patch checks for the scenario of truncating a denormal, and attempts to (possibly partially) replace the initial mantissa right shift by decrementing the exponent, if doing so will still result in a valid *target format* exponent. Index: test/CodeGen/PowerPC/pr16573.ll =================================================================== --- test/CodeGen/PowerPC/pr16573.ll (revision 0) +++ test/CodeGen/PowerPC/pr16573.ll (revision 0) @@ -0,0 +1,11 @@ +; RUN: llc < %s | FileCheck %s + +target triple = "powerpc64-unknown-linux-gnu" + +define double @test() { + %1 = fptrunc ppc_fp128 0xM818F2887B9295809800000000032D000 to double + ret double %1 +} + +; CHECK: .quad -9111018957755033591 + Index: lib/Support/APFloat.cpp =================================================================== --- lib/Support/APFloat.cpp (revision 185817) +++ lib/Support/APFloat.cpp (working copy) @@ -1956,6 +1956,23 @@ X86SpecialNan = true; } + // If this is a truncation of a denormal number, and the target semantics + // has larger exponent range than the source semantics (this can happen + // when truncating from PowerPC double-double to double format), the + // right shift could lose result mantissa bits. Adjust exponent instead + // of performing excessive shift. + if (shift < 0 && isFiniteNonZero()) { + int exponentChange = significandMSB() + 1 - fromSemantics.precision; + if (exponent + exponentChange < toSemantics.minExponent) + exponentChange = toSemantics.minExponent - exponent; + if (exponentChange < shift) + exponentChange = shift; + if (exponentChange < 0) { + shift -= exponentChange; + exponent += exponentChange; + } + } + // If this is a truncation, perform the shift before we narrow the storage. if (shift < 0 && (isFiniteNonZero() || category==fcNaN)) lostFraction = shiftRight(significandParts(), oldPartCount, -shift); llvm-svn: 186409
* [XCore] Fix printing of inline asm operands.Richard Osborne2013-07-162-11/+39
| | | | | | | Previously an asm operand with no operand modifier would give the error "invalid operand in inline asm". llvm-svn: 186407
* ARM: allow printing of ARM atomic DAG nodes.Tim Northover2013-07-161-0/+13
| | | | | | | | We'd forgotten to provide string representations for the special ARMISD atomic nodes; this adds them in. No effect on CodeGen, just makes the output of "-view-whatever-dags" slightly more readable. llvm-svn: 186406
* [SystemZ] Use ROSBG and non-zero form of RISBG for OR nodesRichard Sandiford2013-07-163-1/+289
| | | | llvm-svn: 186405
* Fixing a buildbot failure:unused function.Vladimir Medic2013-07-161-14/+0
| | | | llvm-svn: 186403
* [SystemZ] Add MC support for R[NOX]SBGRichard Sandiford2013-07-164-0/+179
| | | | | | CodeGen support will come later. llvm-svn: 186401
* [SystemZ] Use RISBG for (shift (and ...))Richard Sandiford2013-07-162-98/+321
| | | | | | | Another patch in the series to make more use of R.SBG. This one extends r186072 and r186073 to handle cases where the AND is inside the shift. llvm-svn: 186399
* This patch represents Mips utilization of r186388 code that alows asm ↵Vladimir Medic2013-07-164-270/+242
| | | | | | matcher to emit mnemonics contain '.' characters. This makes asm parser code simpler and more efficient. llvm-svn: 186397
* PPCJITInfo.cpp: Tweak r186252 with s/__ppc/__powerpc/ to work on ↵NAKAMURA Takumi2013-07-161-2/+2
| | | | | | | | powerpc-linux Fedora 12. g++ (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10) llvm-svn: 186396
* ARM: implement ldrex, strex and clrex intrinsicsTim Northover2013-07-168-53/+277
| | | | | | | Intrinsics already existed for the 64-bit variants, so these support operations of size at most 32-bits. llvm-svn: 186392
OpenPOWER on IntegriCloud