1. Oct 15, 2014
    • Simon Pilgrim's avatar
      [X86][SSE] pslldq/psrldq shuffle mask decodes · a798e9ff
      Simon Pilgrim authored
      Patch to provide shuffle decodes and asm comments for the sse pslldq/psrldq SSE2/AVX2 byte shift instructions.
      
      Differential Revision: http://reviews.llvm.org/D5598
      
      llvm-svn: 219738
      a798e9ff
    • David Majnemer's avatar
      MC: Rewrite bigobj test in python · 0b011b33
      David Majnemer authored
      This makes the test easier to work with.  No functionality change
      intended.
      
      llvm-svn: 219737
      0b011b33
    • David Blaikie's avatar
      DebugInfo: Lazily built static member variable declarations should use the... · 8e707bb4
      David Blaikie authored
      DebugInfo: Lazily built static member variable declarations should use the canonical declaration for line/file information.
      
      When lazily constructing static member variable declarations (when
      the vtable optimization fires and the definition of the type is omitted
      (or built later, lazily), but the out of line definition of the static
      member is provided and must be described in debug info) ensure we use
      the canonical declaration when computing the file, line, etc for that
      declaration (rather than the definition, which is also a declaration,
      but not the canonical one).
      
      llvm-svn: 219736
      8e707bb4
    • Tim Northover's avatar
      ARM: remove ARM/Thumb distinction for preferred alignment. · 147cd2f6
      Tim Northover authored
      Thumb1 has legitimate reasons for preferring 32-bit alignment of types
      i1/i8/i16, since the 16-bit encoding of "add rD, sp, #imm" requires #imm to be
      a multiple of 4. However, this is a trade-off betweem code size and RAM usage;
      the DataLayout string is not the best place to represent it even if desired.
      
      So this patch removes the extra Thumb requirements, hopefully making ARM and
      Thumb completely compatible in this respect.
      
      llvm-svn: 219735
      147cd2f6
    • Tim Northover's avatar
      ARM: remove ARM/Thumb distinction for preferred alignment. · cf6ce0c8
      Tim Northover authored
      Thumb1 has legitimate reasons for preferring 32-bit alignment of types
      i1/i8/i16, since the 16-bit encoding of "add rD, sp, #imm" requires #imm to be
      a multiple of 4. However, this is a trade-off betweem code size and RAM usage;
      the DataLayout string is not the best place to represent it even if desired.
      
      So this patch removes the extra Thumb requirements, hopefully making ARM and
      Thumb completely compatible in this respect.
      
      llvm-svn: 219734
      cf6ce0c8
    • Tim Northover's avatar
      ARM: allow misaligned local variables in Thumb1 mode. · 9a4c043d
      Tim Northover authored
      There's no hard requirement on LLVM to align local variable to 32-bits, so the
      Thumb1 frame handling needs to be able to deal with variables that are only
      naturally aligned without falling over.
      
      llvm-svn: 219733
      9a4c043d
    • Kaelyn Takata's avatar
      Be smarter when parsing variable declarations with unknown types. · 2f448467
      Kaelyn Takata authored
      Specifically, avoid typo-correcting the variable name into a type before
      typo-correcting the actual type name in the declaration. Doing so
      results in a very unpleasant cascade of errors, with the typo correction
      of the actual type name being buried in the middle.
      
      llvm-svn: 219732
      2f448467
    • Zachary Turner's avatar
      Create a process launcher abstraction. · 172d37d3
      Zachary Turner authored
      This implements Host::LaunchProcess for windows, and in doing so
      does some minor refactor to move towards a more modular process
      launching design.
      
      The original motivation for this is that launching processes on
      windows needs some very windows specific code, which would live
      most appropriately in source/Host/windows somewhere.  However,
      there is already some common code that all platforms use when
      launching a process before delegating to the platform specific
      stuff, which lives in source/Host/common/Host.cpp which would
      be nice to reuse without duplicating.
      
      This commonality has been abstracted into MonitoringProcessLauncher,
      a class which abstracts out the notion of launching a process using
      an arbitrary algorithm, and then monitoring it for state changes.
      
      The windows specific launching code lives in ProcessLauncherWindows,
      and the posix specific launching code lives in ProcessLauncherPosix.
      When launching a process MonitoringProcessLauncher is created, and
      then an appropriate delegate launcher is created and given to the
      MonitoringProcessLauncher.
      
      Reviewed by: Greg Clayton
      Differential Revision: http://reviews.llvm.org/D5781
      
      llvm-svn: 219731
      172d37d3
    • Zachary Turner's avatar
      Fix a path concatenation issue related to windows paths. · 756acbaa
      Zachary Turner authored
      llvm-svn: 219730
      756acbaa
    • David Majnemer's avatar
      Add a test for writing COFF BigObj · 5fdfa70a
      David Majnemer authored
      llvm-svn: 219729
      5fdfa70a
    • Jason Molenda's avatar
      When PlatformDarwinKernel::ExamineKextForMatchingUUID is given · 63ba883d
      Jason Molenda authored
      a FileSpec, UUID, and ArchSpec, and it's opening all the kexts
      with the same bundle id to see if they're a match, don't set
      the Arch in the ModuleSpec.  If Module::GetObjectFile() sees
      that the architecture of the kext is a mismatch for the arch
      we're looking for, it'll spew a warning message to the dev (r217251).
      
      Rely on the UUID match to get the correct file if we have
      a UUID -- we'll get no warning if it's a mismatch.
      
      <rdar://problem/18641477> 
      
      llvm-svn: 219728
      63ba883d
    • Rui Ueyama's avatar
      Use isa<> and cast<> instead of definition(). · 0abf6130
      Rui Ueyama authored
      No functionality change intended.
      
      llvm-svn: 219727
      0abf6130
    • Juergen Ributzka's avatar
      [FastISel][AArch64] Add custom lowering for GEPs. · 4dfd590e
      Juergen Ributzka authored
      This is mostly a copy of the existing FastISel GEP code, but on AArch64 we bail
      out even for simple cases, because the standard fastEmit functions don't cover
      MUL and ADD is lowered inefficientily.
      
      llvm-svn: 219726
      4dfd590e
    • Hans Wennborg's avatar
      [x86 asm] allow fwait alias in both At&t and Intel modes (PR21208) · f6aafeee
      Hans Wennborg authored
      Differential Revision: http://reviews.llvm.org/D5741
      
      llvm-svn: 219725
      f6aafeee
    • Rui Ueyama's avatar
      Remove dead code. · 82399f96
      Rui Ueyama authored
      Because we use cast<> at the beginning of this function, it will
      abort there if a given atom is not a DefinedAtom.
      
      In the switch statement, we checked if a given atom is a DefinedAtom
      again by evaluating definition() == Atom::definitionRegular.
      This was always true. So we can remove the outer switch statement.
      
      llvm-svn: 219724
      82399f96
    • Rui Ueyama's avatar
      Use isa<> instead of checking return value of definition(). · e1ebc760
      Rui Ueyama authored
      definition() is supposed to be used through isa, dyn_cast or cast.
      It's better to not call that directly.
      
      llvm-svn: 219723
      e1ebc760
    • Ed Maste's avatar
      Fix compiler-rt build on FreeBSD 10.1 · 3ba162d2
      Ed Maste authored
      We have to #define _WANT_RTENTRY to get struct rtentry, and add headers
      that it depends on.
      
      SIOCADDRT and SIOCDELRT also do not exist in FreeBSD 10.1 and were removed
      in FreeBSD rev. 263203:
      
        Garbage collect long time obsoleted (or never used) stuff from routing
        API.
      
      Differential Revision: http://reviews.llvm.org/D5703
      
      llvm-svn: 219722
      3ba162d2
    • Renato Golin's avatar
      Re-enable ASAN/UBSAN tests on ARM, with VFP3 they began to pass · 498b223e
      Renato Golin authored
      When compiling with -mfpu=vfpv3, those tests began to pass, like the others
      with "Illegal Instruction" error, so removing the XFAIL from them should
      get the bot green (and have more tests!).
      
      llvm-svn: 219721
      498b223e
    • Tim Northover's avatar
      ARM: set preferred aggregate alignment to 32 universally. · b98dc4b0
      Tim Northover authored
      Before, ARM and Thumb mode code had different preferred alignments, which could
      lead to some rather unexpected results. There's justification for reducing it
      from the default 64-bits (wasted space), but I don't think there is for going
      below 32-bits.
      
      There's no actual ABI change here, just to reassure people.
      
      llvm-svn: 219720
      b98dc4b0
    • Tim Northover's avatar
      ARM: set preferred aggregate alignment to 32 universally. · aa09ac6e
      Tim Northover authored
      Before, ARM and Thumb mode code had different preferred alignments, which could
      lead to some rather unexpected results. There's justification for reducing it
      from the default 64-bits (wasted space), but I don't think there is for going
      below 32-bits.
      
      There's no actual ABI change here, just to reassure people.
      
      llvm-svn: 219719
      aa09ac6e
    • Hal Finkel's avatar
      [CFL-AA] CFL-AA should not assert on an va_arg instruction · db5f86a9
      Hal Finkel authored
      The CFL-AA implementation was missing a visit* routine for va_arg instructions,
      causing it to assert when run on a function that had one. For now, handle these
      in a conservative way.
      
      Fixes PR20954.
      
      llvm-svn: 219718
      db5f86a9
    • Sanjay Patel's avatar
      Optimize away fabs() calls when input is squared (known positive). · 0ca42bb5
      Sanjay Patel authored
      Eliminate library calls and intrinsic calls to fabs when the input 
      is a squared value.
      
      Note that no unsafe-math / fast-math assumptions are needed for
      this optimization.
      
      Differential Revision: http://reviews.llvm.org/D5777
      
      llvm-svn: 219717
      0ca42bb5
    • Juergen Ributzka's avatar
      [FastISel][AArch64] Fix sign-/zero-extend folding when SelectionDAG is involved. · cd11a280
      Juergen Ributzka authored
      Sign-/zero-extend folding depended on the load and the integer extend to be
      both selected by FastISel. This cannot always be garantueed and SelectionDAG
      might interfer. This commit adds additonal checks to load and integer extend
      lowering to catch this.
      
      Related to rdar://problem/18495928.
      
      llvm-svn: 219716
      cd11a280
    • Bob Wilson's avatar
      Add complex multiply/divide functions to arm64 iOS libclang_rt libraries. · ca0a38e0
      Bob Wilson authored
      Clang r219557 introduces libcalls to complex multiply/divide functions.
      Since these functions are not available in iOS for arm64 devices, add them to
      the static libraries.
      
      llvm-svn: 219715
      ca0a38e0
    • Reid Kleckner's avatar
      Factor code into CXXRecordDecl::getTemplateInstantiationPattern() helper · e7367d6b
      Reid Kleckner authored
      This moves some code from SemaType.cpp's hasVisibleDefinition() into
      DeclCXX.cpp so that it can be used elsewhere. I found one other instance
      of code trying to do the same thing, there are probably more. Search for
      getInstantiatedFrom() to try to find more.
      
      No functionality change.
      
      Reviewed By: rsmith
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D5783
      
      llvm-svn: 219714
      e7367d6b
    • David Majnemer's avatar
      InstCombine: Don't miscompile X % ((Pow2 << A) >>u B) · dad21038
      David Majnemer authored
      We assumed that A must be greater than B because the right hand side of
      a remainder operator must be nonzero.
      
      However, it is possible for A to be less than B if Pow2 is a power of
      two greater than 1.
      
      Take for example:
      i32 %A = 0
      i32 %B = 31
      i32 Pow2 = 2147483648
      
      ((Pow2 << 0) >>u 31) is non-zero but A is less than B.
      
      This fixes PR21274.
      
      llvm-svn: 219713
      dad21038
    • Fariborz Jahanian's avatar
      Patch to warn on interger overflow in presence of · c694e693
      Fariborz Jahanian authored
      implicit casts. Reviewed by Reid Kleckner.
      rdar://18405357
      
      llvm-svn: 219712
      c694e693
    • Greg Clayton's avatar
      Fixed stdio redirection within LLDB to "do the right thing" in all cases. · b8e9b8b7
      Greg Clayton authored
      The main issue was if you didn't specify all three (stdin/out/err), you would get file actions added to the launch that would always use the pseudo terminal. This is now fixed.
      
      Also fixed the test suite test that handles IO to test redirecting things individually and all together and in other combinations to make sure we don't regress.
      
      <rdar://problem/18638226>
      
      llvm-svn: 219711
      b8e9b8b7
    • Jan Vesely's avatar
      Reapply "R600: Add new intrinsic to read work dimensions" · e5121f3c
      Jan Vesely authored
      
      
      This effectively reverts revert 219707. After fixing the test to work with
      new function name format and renamed intrinsic.
      
      Reviewed-by: default avatarTom Stellard <tom@stellard.net>
      Signed-off-by: default avatarJan Vesely <jan.vesely@rutgers.edu>
      llvm-svn: 219710
      e5121f3c
    • Rui Ueyama's avatar
      Use llvm::make_unique. · 4121d5a2
      Rui Ueyama authored
      llvm-svn: 219709
      4121d5a2
    • Hal Finkel's avatar
      Revert "r216914 - Revert: [APFloat] Fixed a bug in method 'fusedMultiplyAdd'" · 171c2ec0
      Hal Finkel authored
      Reapply r216913, a fix for PR20832 by Andrea Di Biagio. The commit was reverted
      because of buildbot failures, and credit goes to Ulrich Weigand for isolating
      the underlying issue (which can be confirmed by Valgrind, which does helpfully
      light up like the fourth of July). Uli explained the problem with the original
      patch as:
      
        It seems the problem is calling multiplySignificand with an addend of category
        fcZero; that is not expected by this routine.  Note that for fcZero, the
        significand parts are simply uninitialized, but the code in (or rather, called
        from) multiplySignificand will unconditionally access them -- in effect using
        uninitialized contents.
      
      This version avoids using a category == fcZero addend within
      multiplySignificand, which avoids this problem (the Valgrind output is also now
      clean).
      
      Original commit message:
      
      [APFloat] Fixed a bug in method 'fusedMultiplyAdd'.
      
      When folding a fused multiply-add builtin call, make sure that we propagate the
      correct result in the case where the addend is zero, and the two other operands
      are finite non-zero.
      
      Example:
        define double @test() {
          %1 = call double @llvm.fma.f64(double 7.0, double 8.0, double 0.0)
          ret double %1
        }
      
      Before this patch, the instruction simplifier wrongly folded the builtin call
      in function @test to constant 'double 7.0'.
      With this patch, method 'fusedMultiplyAdd' correctly evaluates the multiply and
      propagates the expected result (i.e. 56.0).
      
      Added test fold-builtin-fma.ll with the reproducible from PR20832 plus extra
      test cases to verify the behavior of method 'fusedMultiplyAdd' in the presence
      of NaN/Inf operands.
      
      This fixes PR20832.
      
      llvm-svn: 219708
      171c2ec0
    • Rafael Espindola's avatar
      Revert "R600: Add new intrinsic to read work dimensions" · db3f0a24
      Rafael Espindola authored
      This reverts commit r219705.
      
      CodeGen/R600/work-item-intrinsics.ll was failing on linux.
      
      llvm-svn: 219707
      db3f0a24
    • Rafael Espindola's avatar
      Remove unused member variable. · 76936ebc
      Rafael Espindola authored
      Fixes pr20904.
      
      llvm-svn: 219706
      76936ebc
    • Jan Vesely's avatar
      R600: Add new intrinsic to read work dimensions · 86187d23
      Jan Vesely authored
      
      
      v2: Add SI lowering
          Add test
      
      v3: Place work dimensions after the kernel arguments.
      v4: Calculate offset while lowering arguments
      v5: rebase
      v6: change prefix to AMDGPU
      
      Reviewed-by: default avatarTom Stellard <tom@stellard.net>
      Signed-off-by: default avatarJan Vesely <jan.vesely@rutgers.edu>
      llvm-svn: 219705
      86187d23
    • Jan Vesely's avatar
      R600: FMA is VecALU only instruction · df196963
      Jan Vesely authored
      
      
      Reviewed-by: default avatarTom Stellard <tom@stellard.net>
      Signed-off-by: default avatarJan Vesely <jan.vesely@rutgers.edu>
      llvm-svn: 219704
      df196963
    • Reed Kotler's avatar
      Finish getting Mips fast-isel to match up with AArch64 fast-isel · d4ea29e6
      Reed Kotler authored
      Summary:
      In order to facilitate use of common code, checking by reviewers of other fast-isel ports, and hopefully to eventually move most of Mips and other fast-isel ports into target independent code, I've tried to get the two implementations to line up.
      
      There is no functional code change. Just methods moved in the file to be in the same order as in AArch64.
      
      Test Plan: No functional change.
      
      Reviewers: dsanders
      
      Reviewed By: dsanders
      
      Subscribers: llvm-commits, aemerson, rfuhler
      
      Differential Revision: http://reviews.llvm.org/D5692
      
      llvm-svn: 219703
      d4ea29e6
    • David Blaikie's avatar
      DebugInfo: Ensure that all debug location scope chains from instructions... · 3dfe4788
      David Blaikie authored
      DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself.
      
      Let me tell you a tale...
      
      Originally committed in r211723 after discovering a nasty case of weird
      scoping due to inlining, this was reverted in r211724 after it fired in
      ASan/compiler-rt.
      
      (minor diversion where I accidentally committed/reverted again in
      r211871/r211873)
      
      After further testing and fixing bugs in ArgumentPromotion (r211872) and
      Inlining (r212065) it was recommitted in r212085. Reverted in r212089
      after the sanitizer buildbots still showed problems.
      
      Fixed another bug in ArgumentPromotion (r212128) found by this
      assertion.
      
      Recommitted in r212205, reverted in r212226 after it crashed some more
      on sanitizer buildbots.
      
      Fix clang some more in r212761.
      
      Recommitted in r212776, reverted in r212793. ASan failures.
      Recommitted in r213391, reverted in r213432, trying to reproduce flakey
      ASan build failure.
      
      Fixed bugs in r213805 (ArgPromo + DebugInfo), r213952
      (LiveDebugVariables strips dbg_value intrinsics in functions not
      described by debug info).
      
      Recommitted in r214761, reverted in r214999, flakey failure on Windows
      buildbot.
      
      Fixed DeadArgElimination + DebugInfo bug in r219210.
      
      Recommitted in r219215, reverted in r219512, failure on ObjC++ atomic
      properties in the test-suite on Darwin.
      
      Fixed ObjC++ atomic properties issue in Clang in r219690.
      
      [This commit is provided 'as is' with no hope that this is the last time
      I commit this change either expressed or implied]
      
      llvm-svn: 219702
      3dfe4788
    • Ed Maste's avatar
      Skip asan test on FreeBSD · c08a5632
      Ed Maste authored
      The build fails due to missing asan runtime in the FreeBSD base system.
      Instead of marking it expected fail, just skip until we have the runtime
      available.
      
      llvm.org/pr21136
      
      llvm-svn: 219701
      c08a5632
    • Rafael Espindola's avatar
      Remove method that is identical to the base class one. · c5747791
      Rafael Espindola authored
      llvm-svn: 219700
      c5747791
    • Alexey Samsonov's avatar
      [UBSan] XFAIL test added in r219642 on Darwin · 37efdf00
      Alexey Samsonov authored
      llvm-svn: 219699
      37efdf00