1. Aug 21, 2019
  2. Aug 20, 2019
    • Thomas Raoux's avatar
      [CodeGen] Add a pass to do block predication on SSA machine IR. · be699bf3
      Thomas Raoux authored
          For targets requiring aggressive scheduling and/or software pipeline we need to
          apply predication before preRA scheduling. This adds a pass re-using the early
          if-cvt infrastructure but generating predicated instructions instead of
          speculatively executing instructions. It allows doing if conversion on blocks
          containing instructions with side-effects. The pass re-use the target hook from
          postRA if-conversion to let the target decide on the heuristic to apply.
      
          Differential Revision: https://reviews.llvm.org/D66190
      
      llvm-svn: 369395
      be699bf3
    • Zoe Carver's avatar
      [libc++] std::abs should not return double · 6585f018
      Zoe Carver authored
      Implement LWG Issue 2735 by adding std::abs
      tests for several types and checking their
      return value. NFC.
      
      llvm-svn: 369394
      6585f018
    • Louis Dionne's avatar
      [libc++] Explicitly cast in generate_canonical · a47ca1ea
      Louis Dionne authored
      A new clang warning introduced in r367497 was complaining about
      the change in value.
      
      Thanks to Brian Cain for the patch.
      Differential Revision: https://reviews.llvm.org/D66422
      
      llvm-svn: 369393
      a47ca1ea
    • Fangrui Song's avatar
      [llvm-objcopy][test] Add a test to show that argv[0] is included in error/warning messages · 494a4d16
      Fangrui Song authored
      test/llvm-objcopy/ELF/error-format.test is similar to test/llvm-readobj/error-format.test added in D66425.
      
      Reviewed By: grimar, jhenderson
      
      Differential Revision: https://reviews.llvm.org/D66476
      
      llvm-svn: 369392
      494a4d16
    • Fangrui Song's avatar
      [llvm-objcopy] Append '\n' to warning messages · ebd50291
      Fangrui Song authored
      Currently the warning message of `llvm-strip %t.o %t.o` does not include
      the trailing newline. Fix this by appending a '\n'.
      
      This is the only warning llvm-objcopy and llvm-strip can issue.
      
      Reviewed By: jhenderson
      
      Differential Revision: https://reviews.llvm.org/D66475
      
      llvm-svn: 369391
      ebd50291
    • Sanjay Patel's avatar
      [InstCombine] improve readability for icmp with cast folds; NFC · a90ee0ee
      Sanjay Patel authored
      1. Update function name and stale code comments.
      2. Use variable names that are less ambiguous.
      3. Move operand checks into the function as early exits.
      
      llvm-svn: 369390
      a90ee0ee
    • Jinsong Ji's avatar
      [BlockExtractor] Avoid assert with wrong line format · cda334ba
      Jinsong Ji authored
      Summary:
      When the line format is wrong, we may end up accessing out of bound
      memory. eg: the test with invalide line will cause assert.
      Assertion `idx < size()' failed
      
      The fix is to report fatal when we found mismatched line format.
      
      Reviewers: qcolombet, volkan
      
      Reviewed By: qcolombet
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D66444
      
      llvm-svn: 369389
      cda334ba
    • Andrea Di Biagio's avatar
      [X86][BtVer2] Fix latency and throughput of atomic INC/DEC/NEG/NOT. · 16111d37
      Andrea Di Biagio authored
      Latency and throughput of LOCK INC/DEC/NEG/NOT is always 19cy.
      Number of uOPs is still 1.
      
      Differential Revision: https://reviews.llvm.org/D66469
      
      llvm-svn: 369388
      16111d37
    • Haojian Wu's avatar
      [clangd] Fix one testcase in XRefsTests. · 0e8e4b09
      Haojian Wu authored
      Summary:
      The test didn't test anything actually -- it used "[]" as annotation which should be
      "[[]]".
      
      This patch also fixes a bug in XRef where we may return duplicated refs.
      
      Reviewers: ilya-biryukov
      
      Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D66349
      
      llvm-svn: 369387
      0e8e4b09
    • Sanjay Patel's avatar
      [InstCombine] simplify min/max of min/max with same operands (PR35607) · f99d254a
      Sanjay Patel authored
      This is the original integer variant requested in:
      https://bugs.llvm.org/show_bug.cgi?id=35607
      
      As noted in the TODO and several similar TODOs around this block,
      we could do this in instsimplify, but then it would cost more
      because we would be trying to match min/max via ValueTracking
      in 2 different places.
      
      There are 4 commuted variants for each of smin/smax/umin/umax
      that are not matched here. There are also icmp predicate variants
      that are not included in the affected test file because they are
      already handled by instsimplify by folding the final icmp to
      true/false.
      
      https://rise4fun.com/Alive/3KVc
      
        Name: smax(smax, smin)
        %c1 = icmp slt i32 %x, %y
        %c2 = icmp slt i32 %y, %x
        %min = select i1 %c1, i32 %x, i32 %y
        %max = select i1 %c2, i32 %x, i32 %y
        %c3 = icmp sgt i32 %max, %min
        %r = select i1 %c3, i32 %max, i32 %min
        =>
        %r = %max
      
        Name: smin(smax, smin)
        %c1 = icmp slt i32 %x, %y
        %c2 = icmp slt i32 %y, %x
        %min = select i1 %c1, i32 %x, i32 %y
        %max = select i1 %c2, i32 %x, i32 %y
        %c3 = icmp sgt i32 %max, %min
        %r = select i1 %c3, i32 %min, i32 %max
        =>
        %r = %min
      
        Name: umax(umax, umin)
        %c1 = icmp ult i32 %x, %y
        %c2 = icmp ult i32 %y, %x
        %min = select i1 %c1, i32 %x, i32 %y
        %max = select i1 %c2, i32 %x, i32 %y
        %c3 = icmp ult i32 %min, %max
        %r = select i1 %c3, i32 %max, i32 %min
        =>
        %r = %max
      
        Name: umin(umax, umin)
        %c1 = icmp ult i32 %x, %y
        %c2 = icmp ult i32 %y, %x
        %min = select i1 %c1, i32 %x, i32 %y
        %max = select i1 %c2, i32 %x, i32 %y
        %c3 = icmp ult i32 %min, %max
        %r = select i1 %c3, i32 %min, i32 %max
        =>
        %r = %min
      
      llvm-svn: 369386
      f99d254a
    • Johan Vikstrom's avatar
      [Syntax] Added function to get macro expansion tokens to TokenBuffer. · 6687fde0
      Johan Vikstrom authored
      Summary:
      Returns the first token in every mapping where the token is an identifier.
      This API is required to be able to highlight macro expansions in clangd.
      
      Reviewers: hokein, ilya-biryukov
      
      Subscribers: kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D66470
      
      llvm-svn: 369385
      6687fde0