1. Dec 12, 2011
    • Chandler Carruth's avatar
      Update the LangRef documentation for llvm.ctlz and llvm.cttz to specify · f6bb278e
      Chandler Carruth authored
      the behavior with the newly added flag for undefined results on a zero
      input.
      
      I'm terrible at documentation, so comments and suggestions welcome here.
      
      llvm-svn: 146361
      f6bb278e
    • Chandler Carruth's avatar
      Teach the verifier to reject all non-constant arguments to the second · 026cc37e
      Chandler Carruth authored
      argument of the cttz and ctlz intrinsics.
      
      llvm-svn: 146360
      026cc37e
    • Chandler Carruth's avatar
      Update Clang to emit the new form of llvm.cttz and llvm.ctlz intrinsics, · a31b95ca
      Chandler Carruth authored
      setting the is_zero_undef flag appropriately to true as that matches the
      semantics of these GCC builtins.
      
      This is the Clang side of r146357 in LLVM.
      
      llvm-svn: 146358
      a31b95ca
    • Chandler Carruth's avatar
      Switch llvm.cttz and llvm.ctlz to accept a second i1 parameter which · 58a71ed3
      Chandler Carruth authored
      indicates whether the intrinsic has a defined result for a first
      argument equal to zero. This will eventually allow these intrinsics to
      accurately model the semantics of GCC's __builtin_ctz and __builtin_clz
      and the X86 instructions (prior to AVX) which implement them.
      
      This patch merely sets the stage by extending the signature of these
      intrinsics and establishing auto-upgrade logic so that the old spelling
      still works both in IR and in bitcode. The upgrade logic preserves the
      existing (inefficient) semantics. This patch should not change any
      behavior. CodeGen isn't updated because it can use the existing
      semantics regardless of the flag's value.
      
      Note that this will be followed by API updates to Clang and DragonEgg.
      
      Reviewed by Nick Lewycky!
      
      llvm-svn: 146357
      58a71ed3
    • Dylan Noblesmith's avatar
      re-enable unittest · f12dd370
      Dylan Noblesmith authored
      Accidentally left out since r145214/r145217.
      
      llvm-svn: 146356
      f12dd370
    • Dylan Noblesmith's avatar
      ExecutionEngine: refactor interface · 7f26246a
      Dylan Noblesmith authored
      The OptLevel is now redundant with the TargetMachine*.
      And selectTarget() isn't really JIT-specific and could probably
      get refactored into one of the lower level libraries.
      
      llvm-svn: 146355
      7f26246a
    • David Blaikie's avatar
      Fix/test decltype dtor calls with invalid base expression. · 08608f67
      David Blaikie authored
      llvm-svn: 146354
      08608f67
    • Howard Hinnant's avatar
      42b8bb50
    • Craig Topper's avatar
      Remove some remants of the old palign pattern fragment that were still hanging... · 1fdfec63
      Craig Topper authored
      Remove some remants of the old palign pattern fragment that were still hanging around. Also remove a cast from inside getShuffleVPERM2X128Immediate and getShuffleVPERMILPImmediate since the only caller already had done the cast.
      
      llvm-svn: 146344
      1fdfec63
    • Anna Zaks's avatar
      [analyzer] CStringChecker should not rely on the analyzer generating... · 7c96b7db
      Anna Zaks authored
      [analyzer] CStringChecker should not rely on the analyzer generating UndefOrUnknown value when it cannot reason about the expression.
      
      We are now often generating expressions even if the solver is not known to be able to simplify it. This is another cleanup of the existing code, where the rest of the analyzer and checkers should not base their logic on knowing ahead of the time what the solver can reason about. 
      
      In this case, CStringChecker is performing a check for overflow of 'left+right' operation. The overflow can be checked with either 'maxVal-left' or 'maxVal-right'. Previously, the decision was based on whether the expresion evaluated to undef or not. With this patch, we check if one of the arguments is a constant, in which case we know that 'maxVal-const' is easily simplified. (Another option is to use canReasonAbout() method of the solver here, however, it's currently is protected.)
      
      This patch also contains 2 small bug fixes:
       - swap the order of operators inside SValBuilder::makeGenericVal.
       - handle a case when AddeVal is unknown in GenericTaintChecker::getPointedToSymbol.
      
      llvm-svn: 146343
      7c96b7db
    • Benjamin Kramer's avatar
      Reuse forAddr to create ignored AggValueSlots. · 4257ab3f
      Benjamin Kramer authored
      Silences valgrind warnings about uninitalized alignment values.
      
      llvm-svn: 146342
      4257ab3f
  2. Dec 11, 2011
  3. Dec 10, 2011