1. Oct 03, 2016
  2. Oct 02, 2016
    • Simon Pilgrim's avatar
      [X86][AVX] Ensure broadcast loads respect dependencies · 03afbe78
      Simon Pilgrim authored
      To allow broadcast loads of a non-zero'th vector element, lowerVectorShuffleAsBroadcast can replace a load with a new load with an adjusted address, but unfortunately we weren't ensuring that the new load respected the same dependencies.
      
      This patch adds a TokenFactor and updates all dependencies of the old load to reference the new load instead.
      
      Bug found during internal testing.
      
      Differential Revision: https://reviews.llvm.org/D25039
      
      llvm-svn: 283070
      03afbe78
    • Pavel Labath's avatar
      Revert "XFAIL TestSBData for gcc-4.9 i386" · 6b582bf9
      Pavel Labath authored
      Test fixed.
      
      llvm-svn: 283069
      6b582bf9
    • Justin Lebar's avatar
      [CUDA] Allow extern __shared__ on empty-length arrays. · 281ce2af
      Justin Lebar authored
      "extern __shared__ int x[]" is OK.
      
      llvm-svn: 283068
      281ce2af
    • Kirill Bobyrev's avatar
      [clang-rename] Overhaul clang-rename.el. · bbce7e21
      Kirill Bobyrev authored
      * Use lexical binding, as recommended for new libraries.
      * Fix customization variable (set correct group and type).
      * Create a new customization group for the library.
      * Autoload the main clang-rename command so that users don't have to explicitly load the library.
      * Correctly translate between file and buffer positions using bufferpos-to-filepos (if available) or a fallback.
      * Don't invoke the shell, it's not necessary and adds complexity.
      * Save clang-rename output in a buffer and display that on failure.
      * Save all buffers before calling clang-rename. This is required anyway and prevents data loss when the buffer is later reverted.
      * In revert-buffer, use keywords instead of t for Boolean arguments to improve readability.
      * Don't reset buffer modes when reverting.
      * Emacs treats the character after a symbol as part of the symbol, while clang-rename doesn't; resolve this inconsistency.
      * Formatting.
      
      Patch by Philipp Stephani!
      
      Reviewers: omtcyfz
      
      Differential Revision: https://reviews.llvm.org/D25156
      
      llvm-svn: 283067
      bbce7e21
    • Craig Topper's avatar
      [X86] Don't set i64 ADDC/ADDE/SUBC/SUBE as Custom if the target isn't 64-bit.... · 46413af7
      Craig Topper authored
      [X86] Don't set i64 ADDC/ADDE/SUBC/SUBE as Custom if the target isn't 64-bit. This way we don't have to catch them and do nothing with them in ReplaceNodeResults.
      
      llvm-svn: 283066
      46413af7
    • Craig Topper's avatar
      [X86] Fix indentation. NFC · 68c08931
      Craig Topper authored
      llvm-svn: 283065
      68c08931
    • Gor Nishanov's avatar
      [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts · 4ffb434c
      Gor Nishanov authored
      Summary:
      Also makes -fcoroutines_ts to be both a Driver and CC1 flag.
      
      Patch mostly by EricWF.
      
      Reviewers: rnk, cfe-commits, rsmith, EricWF
      
      Subscribers: mehdi_amini
      
      Differential Revision: https://reviews.llvm.org/D25130
      
      llvm-svn: 283064
      4ffb434c
    • Aditya Kumar's avatar
      Alias must point to a definition · e84372b0
      Aditya Kumar authored
      Reapplying the patch after modifying the test case.
      
      Inlining the destructor caused the compiler to generate bad IR which failed the Verifier in the backend.
      https://llvm.org/bugs/show_bug.cgi?id=30341
      
      This patch disables alias to available_externally definitions.
      
      Reviewers: eugenis, rsmith
      
      Differential Revision: https://reviews.llvm.org/D24682
      
      llvm-svn: 283063
      e84372b0
    • Sanjoy Das's avatar
      Revert r283057 and r283058 · f230b0aa
      Sanjoy Das authored
      They've broken the sanitizer-bootstrap bots.  Reverting while I investigate.
      
      Original commit messages:
      
      r283057: "[ConstantRange] Make getEquivalentICmp smarter"
      
      r283058: "[SCEV] Rely on ConstantRange instead of custom logic; NFCI"
      llvm-svn: 283062
      f230b0aa
    • Hal Finkel's avatar
      [PowerPC] Enable soft-float for PPC64, and +soft-float -> -hard-float · 415c2a38
      Hal Finkel authored
      Enable soft-float support on PPC64, as the backend now supports it. Also, the
      backend now uses -hard-float instead of +soft-float, so set the target features
      accordingly.
      
      Fixes PR26970.
      
      llvm-svn: 283061
      415c2a38
    • Hal Finkel's avatar
      [PowerPC] Refactor soft-float support, and enable PPC64 soft float · a9321059
      Hal Finkel authored
      This change enables soft-float for PowerPC64, and also makes soft-float disable
      all vector instruction sets for both 32-bit and 64-bit modes. This latter part
      is necessary because the PPC backend canonicalizes many Altivec vector types to
      floating-point types, and so soft-float breaks scalarization support for many
      operations. Both for embedded targets and for operating-system kernels desiring
      soft-float support, it seems reasonable that disabling hardware floating-point
      also disables vector instructions (embedded targets without hardware floating
      point support are unlikely to have Altivec, etc. and operating system kernels
      desiring not to use floating-point registers to lower syscall cost are unlikely
      to want to use vector registers either). If someone needs this to work, we'll
      need to change the fact that we promote many Altivec operations to act on
      v4f32. To make it possible to disable Altivec when soft-float is enabled,
      hardware floating-point support needs to be expressed as a positive feature,
      like the others, and not a negative feature, because target features cannot
      have dependencies on the disabling of some other feature. So +soft-float has
      now become -hard-float.
      
      Fixes PR26970.
      
      llvm-svn: 283060
      a9321059
    • Sanjoy Das's avatar
      Remove duplicated code; NFC · 1f7b813e
      Sanjoy Das authored
      ICmpInst::makeConstantRange does exactly the same thing as
      ConstantRange::makeExactICmpRegion.
      
      llvm-svn: 283059
      1f7b813e
    • Sanjoy Das's avatar
      [SCEV] Rely on ConstantRange instead of custom logic; NFCI · 1b9cefcf
      Sanjoy Das authored
      llvm-svn: 283058
      1b9cefcf
    • Sanjoy Das's avatar
      [ConstantRange] Make getEquivalentICmp smarter · 6ef69d97
      Sanjoy Das authored
      This change teaches getEquivalentICmp to be smarter about generating
      ICMP_NE and ICMP_EQ predicates.
      
      llvm-svn: 283057
      6ef69d97
    • Sanjoy Das's avatar
      [SCEV] Remove commented out code; NFC · 54e6a21d
      Sanjoy Das authored
      llvm-svn: 283056
      54e6a21d
    • Martell Malone's avatar
      COFF: Fix short import lib import name type bitshift · 3a4d9000
      Martell Malone authored
      As per the PE COFF spec (section 8.3, Import Name Type)
      Offset: 18 Size 2 bits Name: Type
      Offset: 20 Size 3 bits Name: Name Type
      
      Offset: 20 added based on 18+2
      
      Partially commited as rL279069
      
      Differential Revision: https://reviews.llvm.org/D23540
      
      llvm-svn: 283055
      3a4d9000
    • Craig Topper's avatar
      [AVX-512] Check rounding mode for builtins that take one. Rounding mode should... · 7609f1c2
      Craig Topper authored
      [AVX-512] Check rounding mode for builtins that take one. Rounding mode should be either _MM_FROUND_CUR_DIRECTION or a 2-bit rounding mode ORed with _MM_FROUND_NO_EXC.
      
      llvm-svn: 283054
      7609f1c2
    • Craig Topper's avatar
      [AVX-512] Add _MM_FROUND_NO_EXC to test cases that pass a rounding mode... · 49107551
      Craig Topper authored
      [AVX-512] Add _MM_FROUND_NO_EXC to test cases that pass a rounding mode intrinsics. This is preparation for a follow up commit that will check validity of rounding mode argument.
      
      llvm-svn: 283053
      49107551
    • Hal Finkel's avatar
      Remove some additional unnecessary std:: in cmath · 6f557b9f
      Hal Finkel authored
      Unlike in math.h, as Eric pointed out in the review of D18639, we don't need
      the std:: in cmath.
      
      llvm-svn: 283052
      6f557b9f
    • Hal Finkel's avatar
      Use __builtin_isnan/isinf/isfinite in complex · ae22f0b2
      Hal Finkel authored
      The libc-provided isnan/isinf/isfinite macro implementations are specifically
      designed to function correctly, even in the presence of -ffast-math (or, more
      specifically, -ffinite-math-only). As such, on most implementation, these
      either always turn into external function calls (e.g. glibc) or are
      specifically function calls when FINITE_MATH_ONLY is defined (e.g. Darwin).
      
      Our implementation of complex arithmetic makes heavy use of isnan/isinf/isfinite
      to deal with corner cases involving non-finite quantities. This was problematic
      in two respects:
      
        1. On systems where these are always function calls (e.g. Linux/glibc), there was a
           performance penalty
        2. When compiling with -ffast-math, there was a significant performance
           penalty (in fact, on Darwin and systems with similar implementations, the code
           may in fact be slower than not using -ffast-math, because the inline
           definitions provided by libc become unavailable to prevent the checks from
           being optimized out).
      
      Eliding these inf/nan checks in -ffast-math mode is consistent with what
      happens with libstdc++, and in my experience, what users expect. This is
      critical to getting high-performance code when using complex<T>. This change
      replaces uses of those functions on basic floating-point types with calls to
      __builtin_isnan/isinf/isfinite, which Clang will always expand inline. When
      using -ffast-math (or -ffinite-math-only), the optimizer will remove the checks
      as expected.
      
      Differential Revision: https://reviews.llvm.org/D18639
      
      llvm-svn: 283051
      ae22f0b2
    • Simon Pilgrim's avatar
      [X86][SSE] Cleaned up shuffle decode assertion messages · 630dd6ff
      Simon Pilgrim authored
      llvm-svn: 283050
      630dd6ff
    • Tobias Grosser's avatar
      isl: update to isl-0.17.1-233-gc911e6a · 5652c9c8
      Tobias Grosser authored
      llvm-svn: 283049
      5652c9c8
    • Simon Pilgrim's avatar
      [SLPVectorizer][X86] Added fptosi/fptoui tests · 04e249b1
      Simon Pilgrim authored
      llvm-svn: 283048
      04e249b1
    • Simon Pilgrim's avatar
      [CostModel][X86] Added tests for current fptosi/fptoui costs · 1ec20e9b
      Simon Pilgrim authored
      llvm-svn: 283047
      1ec20e9b
    • Simon Pilgrim's avatar
      [SLPVectorizer][X86] Added fcopysign tests · 567c4fbd
      Simon Pilgrim authored
      llvm-svn: 283046
      567c4fbd
    • Simon Pilgrim's avatar
      [SLPVectorizer][X86] Added fabs tests · cceeb2a4
      Simon Pilgrim authored
      llvm-svn: 283045
      cceeb2a4