1. Dec 03, 2019
    • Florian Hahn's avatar
      [MIBundles] Move analyzeVirtReg out of MIBundleOperands iterator (NFC). · 5d062566
      Florian Hahn authored
      analyzeVirtReg does not really fit into the iterator and moving it
      makes it easier to change the base iterator.
      
      Reviewers: evandro, t.p.northover, paquette, MatzeB, arsenm, qcolombet
      
      Reviewed By: qcolombet
      
      Differential Revision: https://reviews.llvm.org/D70558
      5d062566
    • Dan Gohman's avatar
      [WebAssembly] Find wasm-opt with GetProgramPath · 8f1e2151
      Dan Gohman authored
      Instead of just searching for wasm-opt in PATH, use GetProgramPath, which
      checks the `COMPILER_PATH` environment variable, -B paths, and `PATH`.
      
      Differential Revision: https://reviews.llvm.org/D70780
      8f1e2151
    • David Green's avatar
      [AArch64] Attempt to fixup test line. NFC · 1d458734
      David Green authored
      The test is complaining on some of the builders. This attempts to
      adjust the run line to be more line the others in the same folder, using
      clang_cc1 as opposed to the driver.
      1d458734
    • Alexey Bataev's avatar
      [OPENMP]Use cast instead dyn_cast, NFC. · f17a1d8b
      Alexey Bataev authored
      Here the expression is always a DeclRefExpr, no need to use dyn_cast.
      f17a1d8b
    • Alexey Bataev's avatar
      [OPENMP]Fix PR44133: Emit definitions of used constructors/functions. · 478541a6
      Alexey Bataev authored
      Need to fully rebuild the initializer/combiner when instatiating the
      declare reduction constrcut to properly emit used functions.
      478541a6
    • Tyker's avatar
      [clang][modules] Add support for merging lifetime-extended temporaries · 9ec6d712
      Tyker authored
      Summary: Add support for merging lifetime-extended temporaries
      
      Reviewers: rsmith
      
      Reviewed By: rsmith
      
      Subscribers: xbolva00, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D70190
      9ec6d712
    • Taewook Oh's avatar
      Reland "b19ec1eb [BPI] Improve unreachable/ColdCall heurstics to handle loops." · 2da205d4
      Taewook Oh authored
      Summary: b19ec1eb has been reverted because of the test failures
      with PowerPC targets. This patch addresses the issues from the previous
      commit.
      
      Test Plan: ninja check-all. Confirmed that CodeGen/PowerPC/pr36292.ll
      and CodeGen/PowerPC/sms-cpy-1.ll pass
      
      Subscribers: llvm-commits
      2da205d4
    • Florian Hahn's avatar
      [VPlan] Move graph traits (NFC). · fe459ce6
      Florian Hahn authored
      By defining the graph traits right after the VPBlockBase definitions, we
      can make use of them earlier in the file.
      
      Reviewers: hsaito, Ayal, gilr
      
      Reviewed By: gilr
      
      Differential Revision: https://reviews.llvm.org/D70733
      fe459ce6
    • Alex Richardson's avatar
      [update_cc_test_checks.py] Use CHECK_RE from common · 3b55eebd
      Alex Richardson authored
      Summary:
      This change modifies the common.CHECK_RE regex to also handle '//'
      comment prefixes which allows us to share it between clang and IR tests.
      Using the regex from common means that *-SAME lines are also stripped
      now. Before this change using the --function-signature flag would result
      in -SAME: lines from previous runs not being removed.
      
      Reviewers: MaskRay, jdoerfert
      
      Reviewed By: jdoerfert
      
      Subscribers: jdoerfert, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D70890
      3b55eebd
    • Julian Lettner's avatar
      [lit] Be more explicit about the state of tests · 62ab9492
      Julian Lettner authored
      Tests go through the following stages:
        *) discovered
        *) filtered
        *) executed
      
      Only executed tests have a result (e.g., PASS, FAIL, XFAIL, etc.).  See
      "result codes" in Test.py.
      
      Reviewed By: rnk
      
      Differential Revision: https://reviews.llvm.org/D70612
      62ab9492
    • Amaury Séchet's avatar
      c594d14d
    • Fangrui Song's avatar
      [ELF][AArch64] Support R_AARCH64_{CALL26,JUMP26} range extension thunks with addends · bf535ac4
      Fangrui Song authored
      Fixes AArch64 part of PR40438
      
      The current range extension thunk framework does not handle a relocation
      relative to a STT_SECTION symbol with a non-zero addend, which may be
      used by jumps/calls to local functions on some RELA targets (AArch64,
      powerpc ELFv1, powerpc64 ELFv2, etc).  See PR40438 and the following
      code for examples:
      
        // clang -target $target a.cc
        // .text.cold may be placed in a separate output section.
        // The distance between bar in .text.cold and foo in .text may be larger than 128MiB.
        static void foo() {}
        __attribute__((section(".text.cold"))) static int bar() { foo(); return
        0; }
        __attribute__((used)) static int dummy = bar();
      
      This patch makes such thunks with addends work for AArch64. The target
      independent part can be reused by PPC in the future.
      
      On REL targets (ARM, MIPS), jumps/calls are not represented as
      STT_SECTION + non-zero addend (see
      MCELFObjectTargetWriter::needsRelocateWithSymbol), so they don't need
      this feature, but we need to make sure this patch does not affect them.
      
      Reviewed By: peter.smith
      
      Differential Revision: https://reviews.llvm.org/D70637
      bf535ac4
    • Sanjay Patel's avatar
      [InstCombine] fix undef propagation for vector urem transform (PR44186) · af4e5994
      Sanjay Patel authored
      As described here:
      https://bugs.llvm.org/show_bug.cgi?id=44186
      
      The match() code safely allows undef values, but we can't safely
      propagate a vector constant that contains an undef to the new
      compare instruction.
      af4e5994
    • Amaury Séchet's avatar
    • stevewan's avatar
      Add AIX assembler support · 3ebfab70
      stevewan authored
      Summary:
      A skeleton of AIX toolchain and system linker support has been introduced in D68340, and this is a follow on patch to it.
      This patch adds support to system assembler invocation to the AIX toolchain.
      
      Reviewers: daltenty, hubert.reinterpretcast, jasonliu, Xiangling_L, dlj
      
      Reviewed By: daltenty, hubert.reinterpretcast
      
      Subscribers: wuzish, nemanjai, kbarton, jfb, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D69620
      3ebfab70
    • Simon Tatham's avatar
      [ARM,MVE] Add intrinsics to deal with predicates. · d173fb5d
      Simon Tatham authored
      Summary:
      This commit adds the `vpselq` intrinsics which take an MVE predicate
      word and select lanes from two vectors; the `vctp` intrinsics which
      create a tail predicate word suitable for processing the first m
      elements of a vector (e.g. in the last iteration of a loop); and
      `vpnot`, which simply complements a predicate word and is just
      syntactic sugar for the `~` operator.
      
      The `vctp` ACLE intrinsics are lowered to the IR intrinsics we've
      already added (and which D70592 just reorganized). I've filled in the
      missing isel rule for VCTP64, and added another set of rules to
      generate the predicated forms.
      
      I needed one small tweak in MveEmitter to allow the `unpromoted` type
      modifier to apply to predicates as well as integers, so that `vpnot`
      doesn't pointlessly convert its input integer to an `<n x i1>` before
      complementing it.
      
      Reviewers: ostannard, MarkMurrayARM, dmgreen
      
      Reviewed By: dmgreen
      
      Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D70485
      d173fb5d
    • Simon Tatham's avatar
      [ARM,MVE] Rename and clean up VCTP IR intrinsics. · 48cce077
      Simon Tatham authored
      Summary:
      D65884 added a set of Arm IR intrinsics for the MVE VCTP instruction,
      to use in tail predication. But the 64-bit one doesn't work properly:
      its predicate type is `<2 x i1>` / `v2i1`, which isn't a legal MVE
      type (due to not having a full set of instructions that manipulate it
      usefully). The test of `vctp64` in `basic-tail-pred.ll` goes through
      `opt` fine, as the test expects, but if you then feed it to `llc` it
      causes a type legality failure at isel time.
      
      The usual workaround we've been using in the rest of the MVE
      intrinsics family is to bodge `v2i1` into `v4i1`. So I've adjusted the
      `vctp64` IR intrinsic to do that, and completely removed the code (and
      test) that uses that intrinsic for 64-bit tail predication. That will
      allow me to add isel rules (upcoming in D70485) that actually generate
      the VCTP64 instruction.
      
      Also renamed all four of these IR intrinsics so that they have `mve`
      in the name, since its absence was confusing.
      
      Reviewers: ostannard, MarkMurrayARM, dmgreen
      
      Reviewed By: MarkMurrayARM
      
      Subscribers: samparker, kristof.beyls, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D70592
      48cce077
    • Simon Tatham's avatar
      [ARM,MVE] Add an InstCombine rule permitting VPNOT. · 01aefae4
      Simon Tatham authored
      Summary:
      If a user writing C code using the ACLE MVE intrinsics generates a
      predicate and then complements it, then the resulting IR will use the
      `pred_v2i` IR intrinsic to turn some `<n x i1>` vector into a 16-bit
      integer; complement that integer; and convert back. This will generate
      machine code that moves the predicate out of the `P0` register,
      complements it in an integer GPR, and moves it back in again.
      
      This InstCombine rule replaces `i2v(~v2i(x))` with a direct complement
      of the original predicate vector, which we can already instruction-
      select as the VPNOT instruction which complements P0 in place.
      
      Reviewers: ostannard, MarkMurrayARM, dmgreen
      
      Reviewed By: dmgreen
      
      Subscribers: kristof.beyls, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D70484
      01aefae4
  2. Dec 02, 2019