summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Finally, force the target for this test. Should unbreak non-x86 buildbots.Benjamin Kramer2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186445 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL this test on mingw.Rafael Espindola2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186444 91177308-0d34-0410-b5e6-96231b3b80d8
* Label names also differ between platforms. Use a relaxed regex.Benjamin Kramer2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186442 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test not to fail when the target doesn't use leading underscores on symbols.Benjamin Kramer2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186439 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup testing case by using a shorter name for types.Manman Ren2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186436 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove floats from live range splitting costs.Jakob Stoklund Olesen2013-07-16
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186435 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r185393.Jakob Stoklund Olesen2013-07-16
| | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186434 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Use min/max to optimze unsigend vector comparison on X86Juergen Ributzka2013-07-16
| | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186432 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SpecialCaseList match full strings, as documented, using anchors.Peter Collingbourne2013-07-16
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1149 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186431 91177308-0d34-0410-b5e6-96231b3b80d8
* Test commit to verify write access.Juergen Ributzka2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186429 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Add a Unicode conversion wrapper from UTF16 to UTF8Reid Kleckner2013-07-16
| | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186426 91177308-0d34-0410-b5e6-96231b3b80d8
* When the inliner merges allocas, it must keep the larger alignmentHal Finkel2013-07-16
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186425 91177308-0d34-0410-b5e6-96231b3b80d8
* On error, close the temporary file descriptor.Rafael Espindola2013-07-16
| | | | | | With this change llvm-ar can remove the temporary file on windows too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186423 91177308-0d34-0410-b5e6-96231b3b80d8
* SLPVectorizer: Reduce the compile time of the consecutive store lookup.Nadav Rotem2013-07-16
| | | | | | | | Process groups of stores in chunks of 16. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186420 91177308-0d34-0410-b5e6-96231b3b80d8
* Create files with mode 666. This matches the behavior of other unix tools.Rafael Espindola2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186414 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Fix some warnings when self-hosting clang on WindowsReid Kleckner2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186413 91177308-0d34-0410-b5e6-96231b3b80d8
* [APFloat] PR16573: Avoid losing mantissa bits in ppc_fp128 to double truncationUlrich Weigand2013-07-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186409 91177308-0d34-0410-b5e6-96231b3b80d8
* [XCore] Fix printing of inline asm operands.Richard Osborne2013-07-16
| | | | | | | Previously an asm operand with no operand modifier would give the error "invalid operand in inline asm". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186407 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: allow printing of ARM atomic DAG nodes.Tim Northover2013-07-16
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186406 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Use ROSBG and non-zero form of RISBG for OR nodesRichard Sandiford2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186405 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing a buildbot failure:unused function.Vladimir Medic2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186403 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add MC support for R[NOX]SBGRichard Sandiford2013-07-16
| | | | | | | CodeGen support will come later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186401 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Use RISBG for (shift (and ...))Richard Sandiford2013-07-16
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186399 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch represents Mips utilization of r186388 code that alows asm ↵Vladimir Medic2013-07-16
| | | | | | matcher to emit mnemonics contain '.' characters. This makes asm parser code simpler and more efficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186397 91177308-0d34-0410-b5e6-96231b3b80d8
* PPCJITInfo.cpp: Tweak r186252 with s/__ppc/__powerpc/ to work on ↵NAKAMURA Takumi2013-07-16
| | | | | | | | powerpc-linux Fedora 12. g++ (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186396 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: implement ldrex, strex and clrex intrinsicsTim Northover2013-07-16
| | | | | | | Intrinsics already existed for the 64-bit variants, so these support operations of size at most 32-bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186392 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM EABI divmod supportRenato Golin2013-07-16
| | | | | | | | | | | | This patch enables calls to __aeabi_idivmod when in EABI mode, by using the remainder value returned on registers (R1), enabled by the ARM triple "none-eabi". Note that Darwin and GNUEABI triples will continue lowering on GNU style, that is, using the stack for the remainder. Still need to add SREM/UREM support fix for 64-bit lowering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186390 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch allows targets to define weather the instruction mnemonics in asm ↵Vladimir Medic2013-07-16
| | | | | | matcher tables will contain '.' character. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186388 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm/test/Object/directory.ll: Mark it as XFAIL:cygwin. Directories can be ↵NAKAMURA Takumi2013-07-16
| | | | | | opened on cygwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186387 91177308-0d34-0410-b5e6-96231b3b80d8
* Use open+fstat instead of stat+open.Rafael Espindola2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186381 91177308-0d34-0410-b5e6-96231b3b80d8
* Remember that we have a null terminated string.Rafael Espindola2013-07-16
| | | | | | | This is a micro optimization. Instead of going char*->StringRef->Twine->char*, go char*->Twine->char* and avoid having to copy the filename on the stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186380 91177308-0d34-0410-b5e6-96231b3b80d8
* [Object/COFF] Add import_directory_table_entry.Rui Ueyama2013-07-16
| | | | | | | | | | | | Summary: Add import_directory_table_entry to use for .idata section. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1059 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186379 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a version of sys::fs::status that uses fstat.Rafael Espindola2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186378 91177308-0d34-0410-b5e6-96231b3b80d8
* COFF: Add constants for optional data directory.Rui Ueyama2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186377 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead friending status, provide windows and posix constructors to file_status.Rafael Espindola2013-07-16
| | | | | | | This opens the way of having static helpers in the .inc files that can construct a file_status. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186376 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support: Add TimeValue.Win32FILETIME, corresponding to r186374.NAKAMURA Takumi2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186375 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix TimeValue::toWin32Time() to be symmetric to fromWin32Time() and ↵NAKAMURA Takumi2013-07-16
| | | | | | | | | | | compatible to Win32's FILETIME. llvm-ar is the only user of toWin32Time() (via setLastModificationAndAccessTime), and r186298 can be reverted. It had been buggy since the initial commit. FIXME: Could we rename {from|to}Win32Time as {from|to}Win32FILETIME in TimeValue? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186374 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename Support.TimeValue to TimeValue.time_t in unittests/Support.NAKAMURA Takumi2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186372 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'const' qualifiers to static const char* variables.Craig Topper2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186371 91177308-0d34-0410-b5e6-96231b3b80d8
* Add mingw32 to the XFAIL. I forgot about it when adding win32.Rafael Espindola2013-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186365 91177308-0d34-0410-b5e6-96231b3b80d8
* PEI: Support for non-zero SPAdj at beginning of a basic block.Manman Ren2013-07-15
| | | | | | | | | | | | | | | | | | | | | We can have a FrameSetup in one basic block and the matching FrameDestroy in a different basic block when we have struct byval. In that case, SPAdj is not zero at beginning of the basic block. Modify PEI to correctly set SPAdj at beginning of each basic block using DFS traversal. We used to assume SPAdj is 0 at beginning of each basic block. PEI had an assert SPAdjCount || SPAdj == 0. If we have a Destroy <n> followed by a Setup <m>, PEI will assert failure. We can add an extra condition to make sure the pairs are matched: The pairs start with a FrameSetup. But since we are doing a much better job in the verifier, this patch removes the check in PEI. PR16393 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186364 91177308-0d34-0410-b5e6-96231b3b80d8
* PR16628: Fix a bug in the code that merges compares.Nadav Rotem2013-07-15
| | | | | | | | Compares return i1 but they compare different types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186359 91177308-0d34-0410-b5e6-96231b3b80d8
* PPC: Refactoring to support subtarget feature changingHal Finkel2013-07-15
| | | | | | | | | This change mirrors the changes that were made to the X86 and ARM targets to support subtarget feature changing. As indicated in r182899, the mechanism is still undergoing revision, and so as with the X86 and ARM targets, there is no test case yet (there is no effective functionality change). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186357 91177308-0d34-0410-b5e6-96231b3b80d8
* Further simplify test case from r186119/r186035.David Blaikie2013-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186356 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL on windows too and document the XFAILs.Rafael Espindola2013-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186354 91177308-0d34-0410-b5e6-96231b3b80d8
* Machine Verifier: verify FrameSetup and FrameDestroyManman Ren2013-07-15
| | | | | | | | | | | | 1> on every path through the CFG, a FrameSetup <n> is always followed by a FrameDestroy <n> and a FrameDestroy is always followed by a FrameSetup. 2> stack adjustments are identical on all CFG edges to a merge point. 3> frame is destroyed at end of a return block. PR16393 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186350 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove an extra is_directory call.Rafael Espindola2013-07-15
| | | | | | I checked that opening a directory on windows does fail, so this saves a "stat". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186345 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix register subclass handling in PPCInstrInfo::insertSelectHal Finkel2013-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | PPCInstrInfo::insertSelect and PPCInstrInfo::canInsertSelect were computing the common subclass of the true and false inputs, and then selecting either the 32-bit or the 64-bit isel variant based on the result of calling PPC::GPRCRegClass.hasSubClassEq(RC) and PPC::G8RCRegClass.hasSubClassEq(RC) (where RC is the common subclass). Unfortunately, this is not quite right: if we have something like this: %vreg8<def> = SELECT_CC_I8 %vreg4<kill>, %vreg7<kill>, %vreg6<kill>, 76; G8RC_and_G8RC_NOX0:%vreg8 CRRC:%vreg4 G8RC_NOX0:%vreg7,%vreg6 then the common subclass of G8RC_and_G8RC_NOX0 and G8RC_NOX0 is G8RC_NOX0, and G8RC_NOX0 is not a subclass of G8RC (because it also contains the ZERO8 pseudo-register). As a result, we also need to check the common subclass against GPRC_NOR0 and G8RC_NOX0 explicitly. This had not been a problem for clients of insertSelect that called canInsertSelect first (because it had a compensating mistake), but insertSelect is also used by the PPC pseudo-instruction expander, and this error was causing a problem in that context. This problem was found by csmith. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186343 91177308-0d34-0410-b5e6-96231b3b80d8
* [mc-coff] Resolve aliases when emitting COFF relocationsReid Kleckner2013-07-15
| | | | | | | | | | | | This is consistent with the ELF object writer. Add some COFF tests that relocate against an alias. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D1079 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186341 91177308-0d34-0410-b5e6-96231b3b80d8
* R600/SI: Add support for 64-bit loadsTom Stellard2013-07-15
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=65873 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186339 91177308-0d34-0410-b5e6-96231b3b80d8