1. Sep 15, 2020
  2. Sep 14, 2020
    • dfukalov's avatar
      [AMDGPU] Fix for folding v2.16 literals. · b3fb40b3
      dfukalov authored
      It was found some packed immediate operands (e.g. `<half 1.0, half 2.0>`) are
      incorrectly processed so one of two packed values were lost.
      
      Introduced new function to check immediate 32-bit operand can be folded.
      Converted condition about current op_sel flags value to fall-through.
      
      Fixes: SWDEV-247595
      
      Reviewed By: rampitec
      
      Differential Revision: https://reviews.llvm.org/D87158
      
      (cherry picked from commit d03c4034dc80c944ec4a5833ba8f87d60183f866)
      b3fb40b3
  3. Sep 11, 2020
  4. Sep 09, 2020
  5. Sep 08, 2020
  6. Sep 05, 2020
  7. Sep 02, 2020
  8. Sep 01, 2020
  9. Aug 31, 2020
    • Nikita Popov's avatar
      [InstSimplify] Protect against more poison in SimplifyWithOpReplaced (PR47322) · 2526d8c4
      Nikita Popov authored
      Replace the check for poison-producing instructions in
      SimplifyWithOpReplaced() with the generic helper canCreatePoison()
      that properly handles poisonous shifts and thus avoids the problem
      from PR47322.
      
      This additionally fixes a bug in IIQ.UseInstrInfo=false mode, which
      previously could have caused this code to ignore poison flags.
      Setting UseInstrInfo=false should reduce the possible optimizations,
      not increase them.
      
      This is not a full solution to the problem, as poison could be
      introduced more indirectly. This is just a minimal, easy to backport
      fix.
      
      Differential Revision: https://reviews.llvm.org/D86834
      
      (cherry picked from commit a5be86fd)
      2526d8c4
    • sameeran joshi's avatar
      [Flang][NFC] Remove license comments from files in docs/ folder. · 3d27de6c
      sameeran joshi authored
      Solves issue https://reviews.llvm.org/D86131#2247275
      
      Reviewed By: hans
      
      Differential Revision: https://reviews.llvm.org/D86875
      
      (cherry picked from commit f787c9a9)
      3d27de6c
    • Brad Smith's avatar
      Remove OpenBSD/sparc support · 981192dd
      Brad Smith authored
      (cherry picked from commit 4fbf0636)
      981192dd
    • Rainer Orth's avatar
      [cmake] Don't build with -O3 -fPIC on Solaris/sparcv9 · 7166d265
      Rainer Orth authored
      Tests on Solaris/sparcv9 currently show about 250 failures when building
      with gcc, most of them like the following:
      
        FAIL: LLVM-Unit :: Support/./SupportTests/TaskQueueTest.UnOrderedFutures (4269 of 67884)
        ******************** TEST 'LLVM-Unit :: Support/./SupportTests/TaskQueueTest.UnOrderedFutures' FAILED ********************
        Note: Google Test filter = TaskQueueTest.UnOrderedFutures
        [==========] Running 1 test from 1 test case.
        [----------] Global test environment set-up.
        [----------] 1 test from TaskQueueTest
        [ RUN      ] TaskQueueTest.UnOrderedFutures
        0  SupportTests        0x0000000100753b20 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 32
        1  SupportTests        0x0000000100752974 llvm::sys::RunSignalHandlers() + 68
        2  SupportTests        0x0000000100752b18 SignalHandler(int) + 372
        3  libc.so.1           0xffffffff7eedc800 __sighndlr + 12
        4  libc.so.1           0xffffffff7eecf23c call_user_handler + 852
        5  libc.so.1           0xffffffff7eecf594 sigacthandler + 84
        6  SupportTests        0x00000001006f8cb8 std::thread::_State_impl<std::thread::_Invoker<std::tuple<llvm::ThreadPool::ThreadPool(llvm::ThreadPoolStrategy)::'lambda'()> > >::_M_run() + 512
        7  libstdc++.so.6.0.28 0xfffffffc628117cc execute_native_thread_routine + 16
        8  libc.so.1           0xffffffff7eedc6a0 _lwp_start + 0
      
      Since it's effectively impossible to debug such a `SEGV` in a `Release`
      build, I tried a `Debug` build instead, only to find that the failures had
      gone away.
      
      Further investigation revealed that most of the issue centers around
      `llvm/lib/Support/ThreadPool.cpp`.  That file is built with `-O3 -fPIC` in
      a `Release` build.  The failure vanishes if
      
      - compiling without `-fPIC`
      - compiling with `-O -fPIC`
      - linking with GNU `ld` instead of Solaris `ld`
      
      It has meanwhile been determined that `gcc` doesn't correctly heed some TLS
      code sequences.  To make things worse, Solaris `ld` doesn't properly
      validate its assumptions against the input, generating wrong code.
      
      `gld` like `gcc` is more liberal here and correctly deals with the code it
      gets fed from `gcc`.
      
      There's PR target/96607: GCC feeds SPARC/Solaris linker with unrecognized
      TLS sequences <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96607> now.
      
      An attempt to build with `-DLLVM_ENABLE_PIC=Off` initially failed since
      neither `libRemarks.so` (D85626 <https://reviews.llvm.org/D85626>) nor
      `LLVMPolly.so` (D85627 <https://reviews.llvm.org/D85627>) heed that option.
      Even with that fixed, a few codegen failures remain.
      
      Next I tried to build just `ThreadPool.cpp` with `-O -fPIC`.  While that
      fixed the vast majority of the failures, 16 `LLVM :: CodeGen/X86` failures
      remained.
      
      Given that that solution was both incomplete and fragile, I went for
      building the whole tree with `-O -fPIC` for `Release` and `RelWithDebInfo`
      builds.
      
      As detailed in Bug 47304, 2-stage builds also show large numbers of
      failures when building with `-O3` or `-O2`, which are likewise worked
      around by building with `-O` until they are sufficiently analyzed and
      fixed.
      
      This way, all failures relative to a `Debug` build go away.
      
      Tested on `sparcv9-sun-solaris2.11`.
      
      Differential Revision: https://reviews.llvm.org/D85630
      
      (cherry picked from commit 15c66b10)
      7166d265
    • QingShan Zhang's avatar
      [DAGCombine] Don't delete the node if it has uses immediately · defbc77a
      QingShan Zhang authored
      This is the follow up patch for https://reviews.llvm.org/D86183 as we miss to delete the node if NegX == NegY, which has use after we create the node.
      ```
          if (NegX && (CostX <= CostY)) {
            Cost = std::min(CostX, CostZ);
            RemoveDeadNode(NegY);
            return DAG.getNode(Opcode, DL, VT, NegX, Y, NegZ, Flags);  #<-- NegY is used here if NegY == NegX.
          }
      ```
      
      Reviewed By: spatel
      
      Differential Revision: https://reviews.llvm.org/D86689
      
      (cherry picked from commit deb4b258)
      defbc77a
    • Kristof Beyls's avatar
      d98e4c0d
    • Sameeran joshi's avatar
      [FLANG] Pick `.md` files when building sphinx documentation. · e6b4ec96
      Sameeran joshi authored
      Need to build sphinx using below flags to Cmake
      `-DLLVM_ENABLE_SPHINX=ON -DSPHINX_WARNINGS_AS_ERRORS=OFF`.
      Generate html docs using cmake target
      `docs-flang-html`
      Generated html files should be at `build/tools/flang/docs/html`.
      Patch in series from the dicussion on review
      https://reviews.llvm.org/D85828
      
      After this patch the markdown docmentation must be written using guide in-
      `llvm/docs/MarkdownQuickstartTemplate.md`
      
      Reviewed By: sscalpone
      
      Differential Revision: https://reviews.llvm.org/D86131
      
      (cherry picked from commit bc9cdfa1)
      e6b4ec96