Skip to content
  1. Jul 08, 2013
    • Shuxin Yang's avatar
      Fix a SCEV update problem. · efc4c01e
      Shuxin Yang authored
       The symptom is seg-fault, and the root cause is that a SCEV contains a SCEVUnknown
      which has null-pointer to a llvm::Value.
      
       This is how the problem take place:
       ===================================
        1). In the pristine input IR, there are two relevant instrutions Op1 and Op2, 
           Op1's corresponding SCEV (denoted as SCEV(op1)) is a SCEVUnknown, and
           SCEV(Op2) contains SCEV(Op1).  None of these instructions are dead.
      
           Op1 : V1 = ...
           ...
           Op2 : V2 = ... // directly or indirectly (data-flow) depends on Op1
          
        2) Optimizer (LSR in my case) generates an instruction holding the equivalent
           value of Op1, making Op1 dead. 
           Op1': V1' = ...
           Op1: V1 = ... ; now dead)
           Op2 : V2 = ... //Now deps on Op1', but the SCEV(Op2) still contains SCEV(Op1)
      
        3) Op1 is deleted, and call-back function is called to reset 
           SCEV(Op1) to indicate it is invalid. However, SCEV(Op2) is not 
           invalidated as well.
      
        4) Following pass get the cached, invalid SCEV(Op2), and try to manipulate it,
           and cause segfault. 
      
       The fix:
       ========
       It seems there is no clean yet inexpensive fix. I write to dev-list
      soliciting good solution, unforunately no ack. So, I decide to fix this 
      problem in a brute-force way:
      
        When ScalarEvolution::getSCEV is called, check if the cached SCEV 
      contains a invalid SCEVUnknow, if yes, remove the cached SCEV, and
      re-evaluate the SCEV from scratch.
      
        I compile buch of big *.c and *.cpp, fortunately, I don't see any increase
      in compile time.
      
       Misc:
      =====
       The reduced test-case has 2357 lines of code+other-stuff, too big to commit.
      
       rdar://14283433
      
      llvm-svn: 185843
      efc4c01e
    • David Blaikie's avatar
      DebugInfo: Simplify Address Pool index handling. · ac569a65
      David Blaikie authored
      Since the pool indexes are necessarily sequential and contiguous, just
      insert things in the right place rather than having to sort the sequence
      after the fact.
      
      No functionality change.
      
      llvm-svn: 185842
      ac569a65
    • Hal Finkel's avatar
      PPC: Mark vector FREM as Expand by default · e3930225
      Hal Finkel authored
      Another bug found by llvm-stress! This fixes crashing with:
        LLVM ERROR: Cannot select: v4f32 = frem ...
      
      llvm-svn: 185840
      e3930225
    • Rafael Espindola's avatar
    • Rafael Espindola's avatar
      Create files with the correct permission instead of changing it afterwards. · 9a780156
      Rafael Espindola authored
      Not intended functionality change.
      
      llvm-svn: 185830
      9a780156
    • Ulrich Weigand's avatar
      · e840ee2c
      Ulrich Weigand authored
      [PowerPC] Support time base instructions
      
      This adds support for the old-style time base instructions;
      while new programs are supposed to use mfspr, the mftb instructions
      are still supported and in use by existing assembler files.
      
      llvm-svn: 185829
      e840ee2c
    • Ulrich Weigand's avatar
      · c0944b50
      Ulrich Weigand authored
      [PowerPC] Support basic compare mnemonics
      
      This adds support for the basic mnemoics (with the L operand) for the
      fixed-point compare instructions.  These are defined as aliases for the
      already existing CMPW/CMPD patterns, depending on the value of L.
      
      This requires use of InstAlias patterns with immediate literal operands.
      To make this work, we need two further changes:
      
       - define a RegisterPrefix, because otherwise literals 0 and 1 would
         be parsed as literal register names
      
       - provide a PPCAsmParser::validateTargetOperandClass routine to
         recognize immediate literals (like ARM does)
      
      llvm-svn: 185826
      c0944b50
    • Hal Finkel's avatar
      Improve the comment from r185794 (re: PromoteIntRes_BUILD_VECTOR) · 12493bb7
      Hal Finkel authored
      In response to Duncan's review, I believe that the original comment was not as
      clear as it could be. Hopefully, this is better.
      
      llvm-svn: 185824
      12493bb7
    • Bill Schmidt's avatar
      [PowerPC] Fix PR16556 (handle undef ppcf128 in LowerFP_TO_INT). · 2db29ef4
      Bill Schmidt authored
      PPCTargetLowering::LowerFP_TO_INT() expects its source operand to be
      either an f32 or f64, but this is not checked.  A long double
      (ppcf128) operand will normally be custom-lowered to a conversion to
      f64 in this context.  However, this isn't the case for an UNDEF node.
      
      This patch recognizes a ppcf128 as a legal source operand for
      FP_TO_INT only if it's an undef, in which case it creates an undef of
      the target type.
      
      At some point we might want to do a wholesale custom lowering of
      ISD::UNDEF when the type is ppcf128, but it's not really clear that's
      a great idea, and probably more work than it's worth for a situation
      that only arises in the case of a programming error.  At this point I
      think simple is best.
      
      The test case comes from PR16556, and is a crash-test only.
      
      llvm-svn: 185821
      2db29ef4
    • David Majnemer's avatar
      InstCombine: Fold X-C1 <u 2 -> (X & -2) == C1 · fa90a0b3
      David Majnemer authored
      Back in r179493 we determined that two transforms collided with each
      other.  The fix back then was to reorder the transforms so that the
      preferred transform would give it a try and then we would try the
      secondary transform.  However, it was noted that the best approach would
      canonicalize one transform into the other, removing the collision and
      allowing us to optimize IR given to us in that form.
      
      llvm-svn: 185808
      fa90a0b3
    • Nico Rieck's avatar
      Reuse %rax after calling __chkstk on win64 · 51969be7
      Nico Rieck authored
      Reapply this as I reverted the wrong commit.
      
      llvm-svn: 185807
      51969be7
    • Nico Rieck's avatar
      Revert "Proper va_arg/va_copy lowering on win64" · 4801303c
      Nico Rieck authored
      This reverts commit 2b52880592a525cfe04d8f9008a35da8c2ea94c3.
      
      Needs review.
      
      llvm-svn: 185806
      4801303c
    • Richard Sandiford's avatar
      [SystemZ] Remove unwanted part from last commit · d6c78e8f
      Richard Sandiford authored
      I was originally going to use MVC for memmove too, but that's less of
      a clear win.  Remove some accidental left-overs in the previous commit.
      
      llvm-svn: 185804
      d6c78e8f
    • Richard Sandiford's avatar
      [SystemZ] Use MVC for memcpy · d131ff8c
      Richard Sandiford authored
      Use MVC for memcpy in cases where a single MVC is enough.  Using MVC is
      a win for longer copies too, but I'll leave that for later.
      
      llvm-svn: 185802
      d131ff8c
    • Hal Finkel's avatar
      Fix PromoteIntRes_BUILD_VECTOR crash with i1 vectors · 8cb9a0e1
      Hal Finkel authored
      This fixes a bug (found by llvm-stress) in
      DAGTypeLegalizer::PromoteIntRes_BUILD_VECTOR where it assumed that the result
      type would always be larger than the original operands. This is not always
      true, however, with boolean vectors. For example, promoting a node of type v8i1
      (where the operands will be of type i32, the type to which i1 is promoted) will
      yield a node with a result vector element type of i16 (and operands of type
      i32). As a result, we cannot blindly assume that we can ANY_EXTEND the operands
      to the result type.
      
      llvm-svn: 185794
      8cb9a0e1
    • Kai Nacke's avatar
      Revert: Fix wrong code offset for unwind code SET_FPREG. · c5cca5ab
      Kai Nacke authored
      llvm-svn: 185793
      c5cca5ab
    • Kai Nacke's avatar
      939ecd7e
    • Kai Nacke's avatar
      Revert: Fix alignment of unwind data. · 07bad44e
      Kai Nacke authored
      llvm-svn: 185790
      07bad44e
    • Kai Nacke's avatar
      Revert: Emit personality function and Dwarf EH data for Win64 SEH. · 42097301
      Kai Nacke authored
      llvm-svn: 185788
      42097301
    • Hal Finkel's avatar
      Add the nearbyint -> FNEARBYINT mapping to BasicTargetTransformInfo · ec474f28
      Hal Finkel authored
      This fixes an oversight that Intrinsic::nearbyint was not being mapped to
      ISD::FNEARBYINT (thus fixing the over-optimistic cost we were assigning to
      nearbyint calls for some targets).
      
      llvm-svn: 185783
      ec474f28
    • Nico Rieck's avatar
      Revert "Reuse %rax after calling __chkstk on win64" · 43b51056
      Nico Rieck authored
      This reverts commit 01f8d579f7672872324208ac5bc4ac311e81b22e.
      
      llvm-svn: 185781
      43b51056
    • Stephen Lin's avatar
      Remove trailing whitespace from SelectionDAG/*.cpp · cfe7f352
      Stephen Lin authored
      llvm-svn: 185780
      cfe7f352
  2. Jul 07, 2013
  3. Jul 06, 2013
Loading