Skip to content
  1. Jul 10, 2018
    • Florian Hahn's avatar
      [VPlan] Add VPlanTestBase.h with helper class to build VPlan for tests. · 8263975c
      Florian Hahn authored
      Reviewers: dcaballe, hsaito, rengolin
      
      Reviewed By: dcaballe
      
      Differential Revision: https://reviews.llvm.org/D49032
      
      llvm-svn: 336653
      8263975c
    • Martin Storsjö's avatar
      [COFF] Store import symbol pointers as pointers to the base class · 474be005
      Martin Storsjö authored
      Future symbol insertions can potentially change the type of these
      symbols - keep pointers to the base class to reflect this, and
      use dynamic casts to inspect them before using as the subclass
      type.
      
      This fixes crashes that were possible before, by touching these
      symbols that now are populated as e.g. a DefinedRegular, via
      the old pointers with DefinedImportThunk type.
      
      Differential Revision: https://reviews.llvm.org/D48953
      
      llvm-svn: 336652
      474be005
    • George Rimar's avatar
      [ELF] - Improve call graph pasing error reporting. · bc6702a4
      George Rimar authored
      This adds a file name to the error message,
      adds a missing test case and refactors code a bit. 
      
      llvm-svn: 336651
      bc6702a4
    • George Rimar's avatar
      [ELF] - Report call graph profile file names in error messages. · 20b92c4d
      George Rimar authored
      We did not report file names for some reason.
      
      llvm-svn: 336650
      20b92c4d
    • Simon Pilgrim's avatar
      Fix MSVC "signed/unsigned mismatch" warning. NFCI. · c048599f
      Simon Pilgrim authored
      llvm-svn: 336649
      c048599f
    • Dean Michael Berris's avatar
      [XRay][compiler-rt] Fixup build breakage · b251f624
      Dean Michael Berris authored
      Changes:
      
      - Remove static assertion on size of a structure, fails on systems where
        pointers aren't 8 bytes.
      
      - Use size_t instead of deducing type of arguments to
        `nearest_boundary`.
      
      Follow-up to D48653.
      
      llvm-svn: 336648
      b251f624
    • Chandler Carruth's avatar
      [PM/Unswitch] Fix unused variable in r336646. · 148861f5
      Chandler Carruth authored
      llvm-svn: 336647
      148861f5
    • Chandler Carruth's avatar
      [PM/Unswitch] Fix a collection of closely related issues with trivial · 47dc3a34
      Chandler Carruth authored
      switch unswitching.
      
      The core problem was that the way we handled unswitching trivial exit
      edges through the default successor of a switch. For some reason
      I thought the right way to do this was to add a block containing
      unreachable and point the default successor at this block. In
      retrospect, this has an amazing number of problems.
      
      The first issue is the one that this pass has always worked around -- we
      have to *detect* such edges and avoid unswitching them again. This
      seemed pretty easy really. You juts look for an edge to a block
      containing unreachable. However, this pattern is woefully unsound. So
      many things can break it. The amazing thing is that I found a test case
      where *simple-loop-unswitch itself* breaks this! When we do
      a *non-trivial* unswitch of a switch we will end up splitting this exit
      edge. The result will be a default successor that is an exit and
      terminates in ... a perfectly normal branch. So the first test case that
      I started trying to fix is added to the nontrivial test cases. This is
      a ridiculous example that did just amazing things previously. With just
      unswitch, it would create 10+ copies of this stuff stamped out. But if
      you combine it *just right* with a bunch of other passes (like
      simplify-cfg, loop rotate, and some LICM) you can get it to do this
      infinitely. Or at least, I never got it to finish. =[
      
      This, in turn, uncovered another related issue. When we are manipulating
      these switches after doing a trivial unswitch we never correctly updated
      PHI nodes to reflect our edits. As soon as I started changing how these
      edges were managed, it became obvious there were more issues that
      I couldn't realistically leave unaddressed, so I wrote more test cases
      around PHI updates here and ensured all of that works now.
      
      And this, in turn, required some adjustment to how we collect and manage
      the exit successor when it is the default successor. That showed a clear
      bug where we failed to include it in our search for the outer-most loop
      reached by an unswitched exit edge. This was actually already tested and
      the test case didn't work. I (wrongly) thought that was due to SCEV
      failing to analyze the switch. In fact, it was just a simple bug in the
      code that skipped the default successor. While changing this, I handled
      it correctly and have updated the test to reflect that we now get
      precise SCEV analysis of trip counts for the outer loop in one of these
      cases.
      
      llvm-svn: 336646
      47dc3a34
    • Mikhail Dvoretckii's avatar
      [X86] Fast-isel tests for lowered truncation intrinsics · 89c919c2
      Mikhail Dvoretckii authored
      This patch adds fast-isel tests for the IR patterns produced for truncation
      intrinsics in rC336643.
      
      Differential Revision: https://reviews.llvm.org/D48822
      
      llvm-svn: 336645
      89c919c2
    • Dean Michael Berris's avatar
      [XRay][compiler-rt] xray::Array Freelist and Iterator Updates · 0dd4f9f2
      Dean Michael Berris authored
      Summary:
      We found a bug while working on a benchmark for the profiling mode which
      manifests as a segmentation fault in the profiling handler's
      implementation. This change adds unit tests which replicate the
      issues in isolation.
      
      We've tracked this down as a bug in the implementation of the Freelist
      in the `xray::Array` type. This happens when we trim the array by a
      number of elements, where we've been incorrectly assigning pointers for
      the links in the freelist of chunk nodes. We've taken the chance to add
      more debug-only assertions to the code path and allow us to verify these
      assumptions in debug builds.
      
      In the process, we also took the opportunity to use iterators to
      implement both `front()` and `back()` which exposes a bug in the
      iterator decrement operation.  In particular, when we decrement past a
      chunk size boundary, we end up moving too far back and reaching the
      `SentinelChunk` prematurely.
      
      This change unblocks us to allow for contributing the non-crashing
      version of the benchmarks in the test-suite as well.
      
      Reviewers: kpw
      
      Subscribers: mgorny, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D48653
      
      llvm-svn: 336644
      0dd4f9f2
    • Mikhail Dvoretckii's avatar
      [X86] Lowering integer truncation intrinsics to native IR · d1bf9ef0
      Mikhail Dvoretckii authored
      This patch lowers the _mm[256|512]_cvtepi{64|32|16}_epi{32|16|8} intrinsics to
      native IR in cases where the result's length is less than 128 bits.
      
      The resulting IR for 256-bit inputs is folded into VPMOV instructions, while for
      128-bit inputs the vpshufb (or, in the 64-to-32-bit case, vinsertps)
      instructions are generated instead
      
      Differential Revision: https://reviews.llvm.org/D48712
      
      llvm-svn: 336643
      d1bf9ef0
    • Simon Pilgrim's avatar
      [X86][SSE] Prefer BLEND(SHL(v,c1),SHL(v,c2)) over MUL(v, c3) · d32ca2c0
      Simon Pilgrim authored
      Now that rL336250 has landed, we should prefer 2 immediate shifts + a shuffle blend over performing a multiply. Despite the increase in instructions, this is quicker (especially for slow v4i32 multiplies), avoid loads and constant pool usage. It does mean however that we increase register pressure. The code size will go up a little but by less than what we save on the constant pool data.
      
      This patch also adds support for v16i16 to the BLEND(SHIFT(v,c1),SHIFT(v,c2)) combine, and also prevents blending on pre-SSE41 shifts if it would introduce extra blend masks/constant pool usage.
      
      Differential Revision: https://reviews.llvm.org/D48936
      
      llvm-svn: 336642
      d32ca2c0
    • Craig Topper's avatar
      [X86] Regenerate vector-shuffle-512-v8.ll so the script will merge the 32 and... · 5fd020c0
      Craig Topper authored
      [X86] Regenerate vector-shuffle-512-v8.ll so the script will merge the 32 and 64 bit checks together. NFC
      
      llvm-svn: 336641
      5fd020c0
    • Stephen Kelly's avatar
      Test commit · 8613c0b5
      Stephen Kelly authored
      Add redundant doc.
      
      llvm-svn: 336640
      8613c0b5
    • Craig Topper's avatar
      [X86] Use IsProfitableToFold to block vinsertf128rm in favor of insert_subreg... · 08b81a55
      Craig Topper authored
      [X86] Use IsProfitableToFold to block vinsertf128rm in favor of insert_subreg instead of artifically increasing pattern complexity to give priority.
      
      This is a much more direct way to solve the issue than just giving extra priority.
      
      llvm-svn: 336639
      08b81a55
    • Craig Topper's avatar
      [X86] Remove some seemingly unnecessary patterns. · db73f564
      Craig Topper authored
      We're missing the EVEX equivalents of these patterns and seem to get along fine.
      
      I think we end up with X86vzload for the obvious IR cases that would produce this DAG.
      
      llvm-svn: 336638
      db73f564
    • Craig Topper's avatar
      [X86] Use masked the masked scalar fma builtins to implement the default... · 36ab775c
      Craig Topper authored
      [X86] Use masked the masked scalar fma builtins to implement the default rounding version of the fma intrinsics.
      
      The rounding mode is checked in CGBuiltin.cpp to generate the correct intrinsic call.
      
      Making this switch switchs the masking to use the i8 bitcast to <8 x i1> and extract i1 version of the IR for the mask. Previously we ended up with a scalar 'and' plus an icmp.
      
      llvm-svn: 336637
      36ab775c
    • Eric Fiselier's avatar
      Add new string benchmarks · 09701324
      Eric Fiselier authored
      llvm-svn: 336636
      09701324
    • Eric Fiselier's avatar
      Update google-benchark to trunk · fcafd3e6
      Eric Fiselier authored
      llvm-svn: 336635
      fcafd3e6
    • Erik Pilkington's avatar
      [Sema] Fix a structured binding typo correction bug · 1c5ae9bc
      Erik Pilkington authored
      BindingDecls have null type until their initializer is processed, so we can't
      assume that a correction candidate has non-null type.
      
      rdar://41559582
      
      llvm-svn: 336634
      1c5ae9bc
    • Vlad Tsyrklevich's avatar
      Add lowercase OS name feature · 25291f15
      Vlad Tsyrklevich authored
      Summary:
      Some tests already make use of OS feature names, e.g. 'linux' and 'freebsd',
      but they are not actually currently set by lit.
      
      Reviewers: pcc, eugenis
      
      Reviewed By: eugenis
      
      Subscribers: emaste, krytarowski, delcypher, llvm-commits, #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D49115
      
      llvm-svn: 336633
      25291f15
    • Richard Trieu's avatar
      [ODRHash] Merge the two function hashes into one. · 27c1b1a6
      Richard Trieu authored
      Functions that are a sub-Decl of a record were hashed differently than other
      functions.  This change keeps the AddFunctionDecl function and the hash of
      records now calls this function.  In addition, AddFunctionDecl has an option
      to perform a hash as if the body was absent, which is required for some
      checks after loading modules.  Additional logic prevents multiple error
      message from being printed.
      
      llvm-svn: 336632
      27c1b1a6
    • Rui Ueyama's avatar
      Report an error for an extremely large .gdb_index section. · 2a3036fb
      Rui Ueyama authored
      I believe the only way to test this functionality is to create extremely
      large object files and attempt to create a .gdb_index that is greater
      than 4 GiB. But I think that's too much for most environments and buildbots,
      so I'm commiting this without a test that actually triggers the new
      error condition.
      
      llvm-svn: 336631
      2a3036fb
    • Eric Christopher's avatar
      Update crash diagnostics test to avoid attempting to write into various · 6e912c24
      Eric Christopher authored
      directories if possible and to not require %t to have "Output" in the name.
      
      llvm-svn: 336630
      6e912c24
    • Akira Hatanaka's avatar
      Fix parsing of privacy annotations in os_log format strings. · 189359d1
      Akira Hatanaka authored
      Privacy annotations shouldn't have to appear in the first
      comma-delimited string in order to be recognized. Also, they should be
      ignored if they are preceded or followed by non-whitespace characters.
      
      rdar://problem/40706280
      
      llvm-svn: 336629
      189359d1
    • Craig Topper's avatar
      [X86] Remove custom handling for __builtin_ia32_divss_round_mask and... · 1faf953d
      Craig Topper authored
      [X86] Remove custom handling for __builtin_ia32_divss_round_mask and __builtin_ia32_divsd_round_mask.
      
      llvm-svn: 336628
      1faf953d
    • Craig Topper's avatar
      [X86] Add back GCCBuiltin on mask_div_ss/sd_round. · 3e7406b4
      Craig Topper authored
      We no longer need custom handling in clang.
      
      llvm-svn: 336627
      3e7406b4
    • Craig Topper's avatar
      [X86] Correct vfixupimm load patterns to look for an integer load, not a... · 866a377e
      Craig Topper authored
      [X86] Correct vfixupimm load patterns to look for an integer load, not a floating point load bitcasted to integer.
      
      DAG combine wouldn't let a floating point load bitcasted to integer exist. It would just be an integer load.
      
      llvm-svn: 336626
      866a377e
    • Craig Topper's avatar
      [X86] Add test cases that show failure to fold load into vfixupimm... · 59fd2f4c
      Craig Topper authored
      [X86] Add test cases that show failure to fold load into vfixupimm instructions due to bad isel pattern.
      
      llvm-svn: 336625
      59fd2f4c
    • Craig Topper's avatar
      [X86] Remove FloatVT from X86VectorVTInfo in X86InstrAVX512.td · e4f46e4f
      Craig Topper authored
      The only places it was used where places where VT was the same as FloatVT. So switch those uses to VT and drop it.
      
      llvm-svn: 336624
      e4f46e4f
    • Vlad Tsyrklevich's avatar
      Revert "AMDGPU: Force inlining if LDS global address is used" · 688e7522
      Vlad Tsyrklevich authored
      This reverts commit r336587, it was causing test failures on the
      sanitizer bots.
      
      llvm-svn: 336623
      688e7522
    • Craig Topper's avatar
      [X86] Add __builtin_ia32_selectss_128 and __builtin_ia32_selectsd_128 that is... · 638426fc
      Craig Topper authored
      [X86] Add __builtin_ia32_selectss_128 and __builtin_ia32_selectsd_128 that is suitable for use in scalar mask intrinsics.
      
      This will convert the i8 mask argument to <8 x i1> and extract an i1 and then emit a select instruction. This replaces the '(__U & 1)" and ternary operator used in some of intrinsics. The old sequence was lowered to a scalar and and compare. The new sequence uses an i1 vector that will interoperate better with other mask intrinsics.
      
      This removes the need to handle div_ss/sd specially in CGBuiltin.cpp. A follow up patch will add the GCCBuiltin name back in llvm and remove the custom handling.
      
      I made some adjustments to legacy move_ss/sd intrinsics which we reused here to do a simpler extract and insert instead of 2 extracts and two inserts or a shuffle.
      
      llvm-svn: 336622
      638426fc
    • Wolfgang Pieb's avatar
      [DWARF][NFC] Refactor range list emission to use a static helper · e194f73e
      Wolfgang Pieb authored
      This is prep for DWARF v5 range list emission. Emission of a single range list is moved
      to a static helper function.
      
      Reviewer: jdevlieghere
      
      Differential Revision: https://reviews.llvm.org/D49098
      
      llvm-svn: 336621
      e194f73e
    • Rui Ueyama's avatar
      Fix a bug for packed relocations. · a9e169ed
      Rui Ueyama authored
      Previously, we didn't create multiple consecutive bitmaps.
      Added a test to catch this bug too.
      
      Differential Revision: https://reviews.llvm.org/D49107
      
      llvm-svn: 336620
      a9e169ed
    • Matt Morehouse's avatar
      [libFuzzer] Make -fsanitize=memory,fuzzer work. · a34c65e8
      Matt Morehouse authored
      This patch allows libFuzzer to fuzz applications instrumented with MSan
      without recompiling libFuzzer with MSan instrumentation.
      
      Fixes https://github.com/google/sanitizers/issues/958.
      
      Differential Revision: https://reviews.llvm.org/D48891
      
      llvm-svn: 336619
      a34c65e8
    • Casey Carter's avatar
      [test] two small cleanups: · 6cd35e81
      Casey Carter authored
      * Remove unused type from is_assignable.pass.cpp
      
      * Don't specialize `common_type<::X<float>>` in common_type.pass.cpp, which violates the requirements of [meta.trans.other]/5
      
      llvm-svn: 336618
      6cd35e81
    • Sanjay Patel's avatar
      [InstCombine] allow more shuffle folds using safe constants · 69faf464
      Sanjay Patel authored
      getSafeVectorConstantForBinop() was calling getBinOpIdentity() assuming
      that the constant we wanted was operand 1 (RHS). That's wrong, but I
      don't think we could expose a bug or even a suboptimal fold from that
      because the callers have other guards for any binop that would have
      been affected.
      
      llvm-svn: 336617
      69faf464
    • Matt Morehouse's avatar
      Revert "[libFuzzer] Mutation tracking and logging implemented" · a5bb6d53
      Matt Morehouse authored
      This reverts r336597 due to bot breakage.
      
      llvm-svn: 336616
      a5bb6d53
    • Heejin Ahn's avatar
      [WebAssembly] Support for binary atomic RMW instructions · fed7382e
      Heejin Ahn authored
      Summary:
      This adds support for binary atomic read-modify-write instructions:
      add, sub, and, or, xor, and xchg.
      
      This does not yet support translations of some of LLVM IR atomicrmw
      instructions (nand, max, min, umax, and umin) that do not have a direct
      counterpart in wasm instructions.
      
      Reviewers: dschuff
      
      Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D49088
      
      llvm-svn: 336615
      fed7382e
    • Rui Ueyama's avatar
      Simplify RelrSection<ELFT>::updateAllocSize. · 703c872a
      Rui Ueyama authored
      This patch also speeds it up by making some constants compile-time
      constants. Other than that, NFC.
      
      Differential Revision: https://reviews.llvm.org/D49101
      
      llvm-svn: 336614
      703c872a
Loading