platform/upstream/llvm.git
3 years agoswitch a couple of SCEV tests to autogen for ease of update
Philip Reames [Wed, 15 Sep 2021 17:53:27 +0000 (10:53 -0700)]
switch a couple of SCEV tests to autogen for ease of update

3 years ago[MemorySSA] Add verification levels to MemorySSA. [NFC]
Alina Sbirlea [Wed, 15 Sep 2021 17:53:35 +0000 (10:53 -0700)]
[MemorySSA] Add verification levels to MemorySSA. [NFC]

Add two levels of verification for MemorySSA: Fast and Full.
The defaults are kept the same. Full verification always occurs under
EXPENSIVE_CHECKS, but now it can also be requested in a specific pass for
debugging purposes.

3 years agoAdd llvm_unreachable after fully covered switch (NFC)
Mehdi Amini [Wed, 15 Sep 2021 17:52:39 +0000 (17:52 +0000)]
Add llvm_unreachable after fully covered switch (NFC)

This fixes a compiler warning for some version of GCC.

3 years ago[OpenMP] Add support for GOMP depobj
Peyton, Jonathan L [Thu, 26 Aug 2021 19:10:15 +0000 (14:10 -0500)]
[OpenMP] Add support for GOMP depobj

GOMP depobjs are represented as a two intptr_t array. The first
element is the base address of the dependency and the second element
is the flag indicating the type the depobj represents.

Differential Revision: https://reviews.llvm.org/D108790

3 years ago[MLIR] Tighten type constraint on memref.global op def
Uday Bondhugula [Wed, 15 Sep 2021 11:28:19 +0000 (16:58 +0530)]
[MLIR] Tighten type constraint on memref.global op def

Tighten the def of memref.global op to use the right kind of TypeAttr
(of MemRefType).

Differential Revision: https://reviews.llvm.org/D109822

3 years ago[HIP] Diagnose -fopenmp-targets for HIP programs
Yaxun (Sam) Liu [Mon, 13 Sep 2021 19:54:20 +0000 (15:54 -0400)]
[HIP] Diagnose -fopenmp-targets for HIP programs

Diagnose -fopenmp-targets for HIP programs since
dual HIP and OpenMP offloading in the same compilation
is currently not supported by HIP toolchain.

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D109718

3 years ago[CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR by default on Linux
Fangrui Song [Wed, 15 Sep 2021 16:32:59 +0000 (09:32 -0700)]
[CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR by default on Linux

This makes the default build closer to a -DLLVM_ENABLE_RUNTIMES=all build.
The layout is arguably superior because different libraries of target triples
are in different directories, similar to GCC/Debian multiarch.

When LLVM_DEFAULT_TARGET_TRIPLE is x86_64-unknown-linux-gnu,
`lib/clang/14.0.0/lib/libclang_rt.asan-x86_64.a`
is moved to
`lib/clang/14.0.0/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.a`.

In addition, if the host compiler supports -m32 (multilib),
`lib/clang/14.0.0/lib/libclang_rt.asan-i386.a`
is moved to
`lib/clang/14.0.0/lib/i386-unknown-linux-gnu/libclang_rt.asan.a`.

Clang has been detecting both paths for lib/Driver/ToolChains/Gnu.cpp since 2018 (D50547).

---

Note: Darwin needs to be disabled. The hierarchy needs to be sorted out.
The current -DLLVM_DEFAULT_TARGET_TRIPLE=off state is like:
```
lib/clang/14.0.0/lib/darwin/libclang_rt.profile_ios.a
lib/clang/14.0.0/lib/darwin/libclang_rt.profile_iossim.a
lib/clang/14.0.0/lib/darwin/libclang_rt.profile_osx.a
```

Windows needs to be disabled: https://reviews.llvm.org/D107799?id=368557#2963311

Differential Revision: https://reviews.llvm.org/D107799

3 years ago[compiler-rt] Move -fno-omit-frame-pointer check to common config-ix
Michał Górny [Wed, 15 Sep 2021 08:24:37 +0000 (10:24 +0200)]
[compiler-rt] Move -fno-omit-frame-pointer check to common config-ix

9ee64c374605683ae80b9641d5312a72c2a67336 has started using
COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG inside scudo.  However,
the relevant CMake check was performed in builtin-config-ix.cmake,
so the definition was missing when builtins were not built.  Move
the check to config-ix.cmake, so that it runs unconditionally of
the components being built.

Fixes PR#51847

Differential Revision: https://reviews.llvm.org/D109812

3 years ago[InstCombine] Update test checks through autogeneration, add more tests. NFC
Anna Thomas [Wed, 15 Sep 2021 16:16:57 +0000 (16:16 +0000)]
[InstCombine] Update test checks through autogeneration, add more tests. NFC

Updated check lines.
Tests precommitted from D109700.

3 years ago[test] Fix asan/scudo -shared-libsan tests with -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on
Fangrui Song [Wed, 15 Sep 2021 16:07:47 +0000 (09:07 -0700)]
[test] Fix asan/scudo -shared-libsan tests with -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on

On x86_64-unknown-linux-gnu, `-m32` tests set LD_LIBRARY_PATH to
`config.compiler_rt_libdir` (`$build/lib/clang/14.0.0/lib/x86_64-unknown-linux-gnu`)
instead of i386-unknown-linux-gnu, so `-shared-libsan` executables
cannot find their runtime (e.g. `TestCases/replaceable_new_delete.cpp`).

Detect -m32 and -m64 in config.target_cflags, and adjust `config.compiler_rt_libdir`.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D108859

3 years ago[HWASan] Add missing newlines.
Matt Morehouse [Wed, 15 Sep 2021 16:06:01 +0000 (09:06 -0700)]
[HWASan] Add missing newlines.

3 years ago[Test] Add a test showing missing opportunities in branch deletion by indvars
Max Kazantsev [Wed, 15 Sep 2021 15:00:40 +0000 (22:00 +0700)]
[Test] Add a test showing missing opportunities in branch deletion by indvars

3 years ago[mlir][Linalg] Fail comprehensive bufferization if a memref is returned.
Nicolas Vasilache [Wed, 15 Sep 2021 14:02:38 +0000 (14:02 +0000)]
[mlir][Linalg] Fail comprehensive bufferization if a memref is returned.

Summary:

Reviewers:

Subscribers:

Differential revision: https://reviews.llvm.org/D109824

3 years ago[SLP][NFC]Add a test for tiny tree with stores and with not
Alexey Bataev [Wed, 15 Sep 2021 15:06:09 +0000 (08:06 -0700)]
[SLP][NFC]Add a test for tiny tree with stores and with not
same/alternate instructions.

3 years ago[HWASan] Catch cases where libc populated jmp_buf.
Matt Morehouse [Wed, 15 Sep 2021 14:53:25 +0000 (07:53 -0700)]
[HWASan] Catch cases where libc populated jmp_buf.

Some setjmp calls within libc cannot be intercepted while their matching
longjmp calls can be.  This causes problems if our setjmp/longjmp
interceptors don't use the exact same format as libc for populating and
reading the jmp_buf.

We add a magic field to our jmp_buf and populate it in setjmp.  This
allows our longjmp interceptor to notice when a libc jmp_buf is passed
to it.

See discussion on https://reviews.llvm.org/D109699 and
https://reviews.llvm.org/D69045.

Fixes https://github.com/google/sanitizers/issues/1244.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D109787

3 years ago[clang][driver][AIX] Add system libc++ header paths to driver
David Tenty [Tue, 14 Sep 2021 22:05:31 +0000 (18:05 -0400)]
[clang][driver][AIX] Add system libc++ header paths to driver

This change adds the system libc++ header location to the driver. As well we define
the `__LIBC_NO_CPP_MATH_OVERLOADS__` macro when using those headers, in order to suppress
conflicting C++ overloads in the system libc headers that were used by XL C++.

Reviewed By: ZarkoCA

Differential Revision: https://reviews.llvm.org/D109078

3 years ago[RISCV][compiler-rt] Fix an incorrect comment for RV64 __riscv_restore_12
Jessica Clarke [Wed, 15 Sep 2021 14:25:59 +0000 (15:25 +0100)]
[RISCV][compiler-rt] Fix an incorrect comment for RV64 __riscv_restore_12

This was presumably copied from the RV32 implementation and not updated
like the rest.

3 years agoImplement delimited escape sequences.
Corentin Jabot [Wed, 15 Sep 2021 13:52:25 +0000 (09:52 -0400)]
Implement delimited escape sequences.

\x{XXXX} \u{XXXX} and \o{OOOO} are accepted in all languages mode
in characters and string literals.

This is a feature proposed for both C++ (P2290R1) and C (N2785). The
papers have been seen by both committees but are not yet adopted into
either standard. However, they do have support from both committees.

3 years ago[RISCV][compiler-rt] Move RV64 __riscv_restore_1/0 directives next to labels
Jessica Clarke [Wed, 15 Sep 2021 13:42:22 +0000 (14:42 +0100)]
[RISCV][compiler-rt] Move RV64 __riscv_restore_1/0 directives next to labels

This looks like it was copied from the RV32 version and not properly
updated. This has no functional effect but is not good style.

3 years ago[RISCV][compiler-rt] Add missing __riscv_save_1/0 labels for RV64
Jessica Clarke [Wed, 15 Sep 2021 13:42:16 +0000 (14:42 +0100)]
[RISCV][compiler-rt] Add missing __riscv_save_1/0 labels for RV64

These got missed in D91717.

3 years ago[InstCombine] Transform X == 0 ? 0 : X * Y --> X * freeze(Y)
Filipp Zhinkin [Wed, 15 Sep 2021 13:04:06 +0000 (09:04 -0400)]
[InstCombine] Transform X == 0 ? 0 : X * Y --> X * freeze(Y)

Enabled mul folding optimization that was previously disabled
by being incorrect.
To preserve correctness, mul's operand that is not compared
with zero in select's condition is now frozen.

Related bug: https://bugs.llvm.org/show_bug.cgi?id=51286

Correctness:
https://alive2.llvm.org/ce/z/bHef7J
https://alive2.llvm.org/ce/z/QcR7sf
https://alive2.llvm.org/ce/z/vvBLzt
https://alive2.llvm.org/ce/z/jGDXgq
https://alive2.llvm.org/ce/z/3Pe8Z4
https://alive2.llvm.org/ce/z/LGga8M
https://alive2.llvm.org/ce/z/CTG5fs

Differential Revision: https://reviews.llvm.org/D108408

3 years ago[PhaseOrdering] add tests for PR47023; NFC
Sanjay Patel [Wed, 15 Sep 2021 12:17:45 +0000 (08:17 -0400)]
[PhaseOrdering] add tests for PR47023; NFC

3 years ago[CostModel][X86] Adjust bitreverse/ctpop/ctlz/cttz AVX2+ costs based on llvm-mca...
Simon Pilgrim [Wed, 15 Sep 2021 12:02:13 +0000 (13:02 +0100)]
[CostModel][X86] Adjust bitreverse/ctpop/ctlz/cttz AVX2+ costs based on llvm-mca reports

Based off the worse case numbers generated by D103695, the AVX2/512 bit reversing/counting costs were higher than necessary (based off instruction counts instead of actual throughput).

3 years ago[lldb] [Windows] Fix an incorrect assert in NativeRegisterContextWindows_arm
Martin Storsjö [Tue, 14 Sep 2021 18:39:02 +0000 (21:39 +0300)]
[lldb] [Windows] Fix an incorrect assert in NativeRegisterContextWindows_arm

This codepath hadn't been exercised in a build with asserts before.

Differential Revision: https://reviews.llvm.org/D109778

3 years ago[ARM] Move fetching of ARMSubtarget into the scopes that need it. NFC.
Martin Storsjö [Wed, 1 Sep 2021 07:45:11 +0000 (10:45 +0300)]
[ARM] Move fetching of ARMSubtarget into the scopes that need it. NFC.

This was requested in D38253, but missed back then.

Differential Revision: https://reviews.llvm.org/D109046

3 years ago[gn build] (manually) port 2c42a73d6c39
Nico Weber [Wed, 15 Sep 2021 12:01:02 +0000 (08:01 -0400)]
[gn build] (manually) port 2c42a73d6c39

3 years ago[mlir][Linalg] Make codegen strategy late transformations opt-in
Nicolas Vasilache [Wed, 15 Sep 2021 11:00:06 +0000 (11:00 +0000)]
[mlir][Linalg] Make codegen strategy late transformations opt-in

Summary: Making the late transformations opt-in results in less surprising behavior when composing multiple calls to the codegen strategy.

Reviewers:

Subscribers:

Differential revision: https://reviews.llvm.org/D109820

3 years ago[mlir][Linalg] Replace DenseSet by UnionFind in ComprehensiveBufferize - NFC
Nicolas Vasilache [Wed, 15 Sep 2021 10:09:37 +0000 (10:09 +0000)]
[mlir][Linalg] Replace DenseSet by UnionFind in ComprehensiveBufferize - NFC

AliasInfo can now use union-find for a much more efficient implementation.
This brings no functional changes but large performance gains on more complex examples.

Differential Revision: https://reviews.llvm.org/D109819

3 years ago[ARM] Prevent continuous folding of SUBC
David Green [Wed, 15 Sep 2021 10:23:32 +0000 (11:23 +0100)]
[ARM] Prevent continuous folding of SUBC

Under some situations under Thumb1, we could be stuck in an infinite
loop recombining the same instruction. This puts a limit on that, not
combining SUBC with SUBE repeatedly.

3 years ago[DSE] Add capture-before test cases with loads.
Florian Hahn [Tue, 14 Sep 2021 16:16:32 +0000 (17:16 +0100)]
[DSE] Add capture-before test cases with loads.

Add a set of test cases where redundant stores may be removable,
depending on whether a local allocation gets captured before performing
a load.

3 years ago[LV] Recognize intrinsic min/max reductions
David Green [Wed, 15 Sep 2021 09:45:50 +0000 (10:45 +0100)]
[LV] Recognize intrinsic min/max reductions

This extends the reduction logic in the vectorizer to handle intrinsic
versions of min and max, both the floating point variants already
created by instcombine under fastmath and the integer variants from
D98152.

As a bonus this allows us to match a chain of min or max operations into
a single reduction, similar to how add/mul/etc work.

Differential Revision: https://reviews.llvm.org/D109645

3 years ago[X86] combineX86ShuffleChain - ensure we only peek through bitcasts to vectors (PR51858)
Simon Pilgrim [Wed, 15 Sep 2021 09:20:54 +0000 (10:20 +0100)]
[X86] combineX86ShuffleChain - ensure we only peek through bitcasts to vectors (PR51858)

When searching for hidden identity shuffles (added at rG41146bfe82aecc79961c3de898cda02998172e4b), only peek through bitcasts to the source operand if it is a vector type as well.

3 years ago[MIPS] Remove unused tblgen template args. NFC
Simon Atanasyan [Wed, 15 Sep 2021 05:45:46 +0000 (08:45 +0300)]
[MIPS] Remove unused tblgen template args. NFC

Identified in D109359.

3 years ago[OpenCL] Supports optional image types in C++ for OpenCL 2021
Justas Janickas [Tue, 31 Aug 2021 13:19:27 +0000 (14:19 +0100)]
[OpenCL] Supports optional image types in C++ for OpenCL 2021

Adds support for a feature macro `__opencl_c_images` in C++ for
OpenCL 2021 enabling a respective optional core feature from
OpenCL 3.0.

This change aims to achieve compatibility between C++ for OpenCL
2021 and OpenCL 3.0.

Differential Revision: https://reviews.llvm.org/D109002

3 years ago[NVPTX] NFC: Remove unused imm type intrinsic arg
Cullen Rhodes [Wed, 15 Sep 2021 07:56:27 +0000 (07:56 +0000)]
[NVPTX] NFC: Remove unused imm type intrinsic arg

Identified in D109359.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D109755

3 years ago[LV] Min/max intrinsic reduction test cases.
David Green [Wed, 15 Sep 2021 08:56:19 +0000 (09:56 +0100)]
[LV] Min/max intrinsic reduction test cases.

3 years ago[mlir][linalg] ComprehensiveBufferize: Do not copy InitTensorOp results
Matthias Springer [Wed, 15 Sep 2021 08:26:29 +0000 (17:26 +0900)]
[mlir][linalg] ComprehensiveBufferize: Do not copy InitTensorOp results

E.g.:

```
%2 = memref.alloc() {alignment = 128 : i64} : memref<256x256xf32>
%3 = memref.alloc() {alignment = 128 : i64} : memref<256x256xf32>

// ... (%3 is not written to)

linalg.copy(%3, %2) : memref<256x256xf32>, memref<256x256xf32>
vector.transfer_write %11, %2[%c0, %c0] {in_bounds = [true, true]} : vector<256x256xf32>, memref<256x256xf32>
```

Avoid copies of %3 if %3 came directly from an InitTensorOp.

Differential Revision: https://reviews.llvm.org/D109742

3 years ago[VPlan] Support sinking recipes with uniform users outside sink target.
Florian Hahn [Wed, 15 Sep 2021 07:33:24 +0000 (08:33 +0100)]
[VPlan] Support sinking recipes with uniform users outside sink target.

This is a first step towards addressing the last remaining limitation of
the VPlan version of sinkScalarOperands: the legacy version can
partially sink operands. For example, if a GEP has uniform users outside
the sink target block, then the legacy version will sink all scalar
GEPs, other than the one for lane 0.

This patch works towards addressing this case in the VPlan version by
detecting such cases and duplicating the sink candidate. All users
outside of the sink target will be updated to use the uniform clone.

Note that this highlights an issue with VPValue naming. If we duplicate
a replicate recipe, they will share the same underlying IR value and
both VPValues will have the same name ir<%gep>.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D104254

3 years ago[X86][InlineAsm] Use mem size information (*word ptr) for "global variable + register...
Xiang1 Zhang [Tue, 14 Sep 2021 05:19:22 +0000 (13:19 +0800)]
[X86][InlineAsm] Use mem size information (*word ptr) for "global variable + registers" memory expression in inline asm.

Differential Revision: https://reviews.llvm.org/D109739

3 years ago[mlir] Update docs on conversion and translation to LLVM
Alex Zinenko [Fri, 10 Sep 2021 13:47:57 +0000 (15:47 +0200)]
[mlir] Update docs on conversion and translation to LLVM

Create a new document that explain both stages of the process in a single
place, merge and deduplicate the content from the two previous documents. Also
extend the documentation to account for the recent changes in pass structure
due to standard dialect splitting and translation being more flexible.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D109605

3 years ago[mlir][linalg] Update OpDSL doc (NFC).
Tobias Gysi [Wed, 15 Sep 2021 07:35:57 +0000 (07:35 +0000)]
[mlir][linalg] Update OpDSL doc (NFC).

Update the doc due to recent path changes an point to a helper script.

3 years ago[AArch64][GlobalISel] Add a new reassociation for G_PTR_ADDs.
Amara Emerson [Thu, 9 Sep 2021 17:14:17 +0000 (10:14 -0700)]
[AArch64][GlobalISel] Add a new reassociation for G_PTR_ADDs.

G_PTR_ADD (G_PTR_ADD X, C), Y) -> (G_PTR_ADD (G_PTR_ADD(X, Y), C)

Improves CTMark -Os on AArch64:

Program            before after  diff
           sqlite3 286932 287024  0.0%
                kc 432512 432508 -0.0%
             SPASS 412788 412764 -0.0%
    pairlocalalign 249460 249416 -0.0%
            bullet 475740 475512 -0.0%
    7zip-benchmark 568864 568356 -0.1%
  consumer-typeset 419088 418648 -0.1%
        tramp3d-v4 367628 367224 -0.1%
          clamscan 383184 382732 -0.1%
            lencod 430028 429284 -0.2%
Geomean difference               -0.1%

Differential Revision: https://reviews.llvm.org/D109528

3 years ago[NPM] Added -print-pipeline-passes print params for a few passes.
Markus Lavin [Wed, 15 Sep 2021 06:22:12 +0000 (08:22 +0200)]
[NPM] Added -print-pipeline-passes print params for a few passes.

Added '-print-pipeline-passes' printing of parameters for those passes
declared with *_WITH_PARAMS macro in PassRegistry.def.

Note that it only prints the parameters declared inside *_WITH_PARAMS as
in a few cases there appear to be additional parameters not parsable.

The following passes are now covered (i.e. all of those with *_WITH_PARAMS in
PassRegistry.def).

LoopExtractorPass - loop-extract
HWAddressSanitizerPass - hwsan
EarlyCSEPass - early-cse
EntryExitInstrumenterPass - ee-instrument
LowerMatrixIntrinsicsPass - lower-matrix-intrinsics
LoopUnrollPass - loop-unroll
AddressSanitizerPass - asan
MemorySanitizerPass - msan
SimplifyCFGPass - simplifycfg
LoopVectorizePass - loop-vectorize
MergedLoadStoreMotionPass - mldst-motion
GVN - gvn
StackLifetimePrinterPass - print<stack-lifetime>
SimpleLoopUnswitchPass - simple-loop-unswitch

Differential Revision: https://reviews.llvm.org/D109310

3 years agoAdd extra check for llvm::Any::TypeId visibility
serge-sans-paille [Fri, 3 Sep 2021 18:52:53 +0000 (20:52 +0200)]
Add extra check for llvm::Any::TypeId visibility

This check should ensure we don't reproduce the problem fixed by
02df443d2801601a4e42e360e436d97314e9da30

More accurately, it checks every llvm::Any::TypeId symbol in libLLVM-x.so and
make sure they have weak linkage and are not local to the library, which would
lead to duplicate definition if another weak version of the symbol is defined in
another linked library.

Differential Revision: https://reviews.llvm.org/D109252

3 years ago[obj2yaml][XCOFF] Dump sections
Esme-Yi [Wed, 15 Sep 2021 05:16:33 +0000 (05:16 +0000)]
[obj2yaml][XCOFF] Dump sections

Summary: This patch implements parsing sections for obj2yaml on AIX.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D98003

3 years ago[CSSPGO][llvm-profgen] Truncate stack samples with invalid return address.
Hongtao Yu [Tue, 14 Sep 2021 23:44:41 +0000 (16:44 -0700)]
[CSSPGO][llvm-profgen] Truncate stack samples with invalid return address.

Invalid frame addresses exist in call stack samples due to bad unwinding. This could happen to frame-pointer-based unwinding and the callee functions that do not have the frame pointer chain set up. It isn't common when the program is built with the frame pointer omission disabled, but can still happen with third-party static libs built with frame pointer omitted.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D109638

3 years agoRevert "[flang] Make 'this_image()' an intrinsic function"
Mehdi Amini [Wed, 15 Sep 2021 03:28:34 +0000 (03:28 +0000)]
Revert "[flang] Make 'this_image()' an intrinsic function"

This reverts commit 81f8ad1769665a569a235b749e0e9e69ce7dc65e.
This seems to break the shared libs build
(linaro-flang-aarch64-sharedlibs bot) with:

  undefined reference to `Fortran::semantics::IsCoarray(Fortran::semantics::Symbol const&)

(from tools/flang/lib/Evaluate/CMakeFiles/obj.FortranEvaluate.dir/tools.cpp.o)

When linking lib/libFortranEvaluate.so.14git

3 years agoMake the --mlir-disable-threading command line option overrides the C++ API usage
Mehdi Amini [Wed, 15 Sep 2021 01:38:38 +0000 (01:38 +0000)]
Make the --mlir-disable-threading command line option overrides the C++ API usage

This seems in-line with the intent and how we build tools around it.
Update the description for the flag accordingly.
Also use an injected thread pool in MLIROptMain, now we will create
threads up-front and reuse them across split buffers.

Differential Revision: https://reviews.llvm.org/D109802

3 years ago[MLIR] Use memref.copy ops in BufferResultsToOutParams pass.
cwz920716 [Wed, 15 Sep 2021 02:59:18 +0000 (02:59 +0000)]
[MLIR] Use memref.copy ops in BufferResultsToOutParams pass.

Both copy/alloc ops are using memref dialect after this change.

Reviewed By: silvas, mehdi_amini

Differential Revision: https://reviews.llvm.org/D109480

3 years ago[gn build] Port 626586fc253c
LLVM GN Syncbot [Wed, 15 Sep 2021 02:29:04 +0000 (02:29 +0000)]
[gn build] Port 626586fc253c

3 years agoRe-Revert "clang-tidy: introduce readability-containter-data-pointer check"
Nico Weber [Wed, 15 Sep 2021 02:27:59 +0000 (22:27 -0400)]
Re-Revert "clang-tidy: introduce readability-containter-data-pointer check"

This reverts commit 49992c04148e5327bef9bd2dff53a0d46004b4b4.
The test is still failing on Windows, see comments on https://reviews.llvm.org/D108893

3 years agoregen an autogened test which is stale
Philip Reames [Wed, 15 Sep 2021 01:42:16 +0000 (18:42 -0700)]
regen an autogened test which is stale

3 years agoDAG: Fix incorrect folding of fmul -1 to fneg
Matt Arsenault [Thu, 26 Aug 2021 02:10:40 +0000 (22:10 -0400)]
DAG: Fix incorrect folding of fmul -1 to fneg

The fmul is a canonicalizing operation, and fneg is not so this would
break denormals that need flushing and also would not quiet signaling
nans. Fold to fsub instead, which is also canonicalizing.

3 years ago[CSSPGO] Enable pseudo probe instrumentation in O0 mode.
Hongtao Yu [Thu, 9 Sep 2021 18:41:39 +0000 (11:41 -0700)]
[CSSPGO] Enable pseudo probe instrumentation in O0 mode.

Pseudo probe instrumentation was missing from O0 build. It is needed in cases where some source files are built in O0 while the others are built in optimize mode.

Reviewed By: wenlei, wlei, wmi

Differential Revision: https://reviews.llvm.org/D109531

3 years ago[lld][WebAssembly] Use llvm-objdump to test __wasm_init_memory
Thomas Lively [Wed, 15 Sep 2021 01:07:58 +0000 (18:07 -0700)]
[lld][WebAssembly] Use llvm-objdump to test __wasm_init_memory

Rather than depending on the hex dump from obj2yaml. Now the test shows the
expected function body in a human readable format.

Differential Revision: https://reviews.llvm.org/D109730

3 years agoRegAllocGreedy: Account for reserved registers in num regs heuristic
Matt Arsenault [Sat, 21 Aug 2021 18:54:51 +0000 (14:54 -0400)]
RegAllocGreedy: Account for reserved registers in num regs heuristic

This simple heuristic uses the estimated live range length combined
with the number of registers in the class to switch which heuristic to
use. This was taking the raw number of registers in the class, even
though not all of them may be available. AMDGPU heavily relies on
dynamically reserved numbers of registers based on user attributes to
satisfy occupancy constraints, so the raw number is highly misleading.

There are still a few problems here. In the original testcase that
made me notice this, the live range size is incorrect after the
scheduler rearranges instructions, since the instructions don't have
the original InstrDist offsets. Additionally, I think it would be more
appropriate to use the number of disjointly allocatable registers in
the class. For the AMDGPU register tuples, there are a large number of
registers in each tuple class, but only a small fraction can actually
be allocated at the same time since they all overlap with each
other. It seems we do not have a query that corresponds to the number
of independently allocatable registers. Relatedly, I'm still debugging
some allocation failures where overlapping tuples seem to not be
handled correctly.

The test changes are mostly noise. There are a handful of x86 tests
that look like regressions with an additional spill, and a handful
that now avoid a spill. The worst looking regression is likely
test/Thumb2/mve-vld4.ll which introduces a few additional
spills. test/CodeGen/AMDGPU/soft-clause-exceeds-register-budget.ll
shows a massive improvement by completely eliminating a large number
of spills inside a loop.

3 years ago[CMake] Delete obsoleted COMPILER_RT_TEST_TARGET_TRIPLE
Fangrui Song [Wed, 15 Sep 2021 00:46:50 +0000 (17:46 -0700)]
[CMake] Delete obsoleted COMPILER_RT_TEST_TARGET_TRIPLE

The last user has been removed from llvm-zorg for Android.

3 years ago[mlir][linalg] PadTensorOp vectorization: Avoid redundant FillOps
Matthias Springer [Tue, 14 Sep 2021 23:57:55 +0000 (08:57 +0900)]
[mlir][linalg] PadTensorOp vectorization: Avoid redundant FillOps

Do not generate FillOps when these would be entirely overwritten.

Differential Revision: https://reviews.llvm.org/D109741

3 years agoSeparateConstOffsetFromGEP: Fix stack overflow in unreachable code
Matt Arsenault [Tue, 14 Sep 2021 01:16:17 +0000 (21:16 -0400)]
SeparateConstOffsetFromGEP: Fix stack overflow in unreachable code

ConstantOffsetExtractor::Find was infinitely recursing on the add
referencing itself.

3 years agoAttributor: Fix crash on undef in !callees
Matt Arsenault [Tue, 14 Sep 2021 01:35:53 +0000 (21:35 -0400)]
Attributor: Fix crash on undef in !callees

3 years agoAMDGPU: Rename attributor class for uniform-work-group-size
Matt Arsenault [Thu, 9 Sep 2021 22:40:22 +0000 (18:40 -0400)]
AMDGPU: Rename attributor class for uniform-work-group-size

This isn't really an AMDGPU specific attribute and could be moved to
generic code. It's also important to include the word uniform in the
name.

3 years agoAttributor: Fix typos
Matt Arsenault [Thu, 9 Sep 2021 22:45:12 +0000 (18:45 -0400)]
Attributor: Fix typos

3 years ago[flang] Make 'this_image()' an intrinsic function
Craig Rasmussen [Tue, 14 Sep 2021 18:04:44 +0000 (11:04 -0700)]
[flang] Make 'this_image()' an intrinsic function

Added 'this_image()' to the list of functions that are evaluated as intrinsic.
Added IsCoarray functions to determine if an expression is a coarray (corank > 1).

Added save attribute to coarray variables in test file, this_image.f90.

reviewers: klausler, PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D108059

3 years agoRemove unused llvm/Support/Parallel.h from MLIR (NFC)
Mehdi Amini [Tue, 14 Sep 2021 23:30:42 +0000 (23:30 +0000)]
Remove unused llvm/Support/Parallel.h from MLIR (NFC)

This header aren't needed anymore: MLIR is using a thread pool
injected in the context instead of a global one.

3 years agoNFC: DebugInfo: refactor pretty printing into a utility class
David Blaikie [Tue, 14 Sep 2021 21:48:08 +0000 (14:48 -0700)]
NFC: DebugInfo: refactor pretty printing into a utility class

Laying more foundation for full template name rebuilding - more complex
type printing benefits from an object to carry some state rather than
passing it around as parameters to every function.

3 years ago[test] precommit anoter test for D109786
Philip Reames [Tue, 14 Sep 2021 22:31:44 +0000 (15:31 -0700)]
[test] precommit anoter test for D109786

3 years ago[test] precommit test for D109786
Philip Reames [Tue, 14 Sep 2021 22:22:43 +0000 (15:22 -0700)]
[test] precommit test for D109786

3 years ago[mlir] Apply py::module_local() to a few more classes.
Sean Silva [Tue, 14 Sep 2021 21:55:54 +0000 (21:55 +0000)]
[mlir] Apply py::module_local() to a few more classes.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D109776

3 years agoautogen a test for ease of update in later patch
Philip Reames [Tue, 14 Sep 2021 21:48:47 +0000 (14:48 -0700)]
autogen a test for ease of update in later patch

3 years ago[SCEV] Stop applying contextual flags in applyLoopGuards
Philip Reames [Tue, 14 Sep 2021 21:08:47 +0000 (14:08 -0700)]
[SCEV] Stop applying contextual flags in applyLoopGuards

This fixes a violation of the wrap flag rules introduced in c4048d8f. As noted in the original review, the NUW is legal to infer from the structure of the replacee, but a) there's no test coverage, and b) this should be done generically for all multiplies.

Differential Revision: https://reviews.llvm.org/D109782

3 years ago[StopInfoMachException] Summarize arm64e BLRAx/LDRAx auth failures
Vedant Kumar [Thu, 14 Nov 2019 21:12:46 +0000 (13:12 -0800)]
[StopInfoMachException] Summarize arm64e BLRAx/LDRAx auth failures

Upstream lldb support for summarizing BLRAx and LDRAx auth failures.

rdar://41615322

Differential Revision: https://reviews.llvm.org/D102428

3 years ago[SCEV] Attempt to define what flags are legal on a SCEV
Philip Reames [Tue, 14 Sep 2021 20:10:17 +0000 (13:10 -0700)]
[SCEV] Attempt to define what flags are legal on a SCEV

This is an attempt to define what the current semantics are closest too.  Unfortunately, the current implementation does appear to be inconsistent with all semantic variants we've considered.  This semantics is the one which seems to be closest to the spirit of the code, and that matched several long time contributors mental models of how the code "should work".

https://bugs.llvm.org/show_bug.cgi?id=51817 tracks the list of currently known violations of these rules.  A series of follow up patches will be addressing each now that we've defined them to be bugs.

Differential Revision: https://reviews.llvm.org/D109553

3 years ago[CMake][AIX] Disable visibility options in build
David Tenty [Fri, 20 Aug 2021 03:01:22 +0000 (23:01 -0400)]
[CMake][AIX] Disable visibility options in build

Visibility options currently have limited support on AIX and may cause warnings or errors
depending on the build compiler used.

Reviewed By: ZarkoCA

Differential Revision: https://reviews.llvm.org/D108467

3 years agoRevert "[WebAssembly] Rethrow longjmp in EH handling if EmSjLj is enabled"
Heejin Ahn [Tue, 14 Sep 2021 19:58:09 +0000 (12:58 -0700)]
Revert "[WebAssembly] Rethrow longjmp in EH handling if EmSjLj is enabled"

This reverts commit b7b4ebbcfa463a7fae61dca7cec30c5b747bdec8.

Reason: This breaks several code-size tests in Emscripten test suite
because this exports `emscripten_longjmp` for programs that didn't do it
before.

3 years ago[AMDGPU] Switch PostRA sched to MachineSched
Joe Nash [Wed, 8 Sep 2021 17:22:15 +0000 (13:22 -0400)]
[AMDGPU] Switch PostRA sched to MachineSched

Use GCNHazardRecognizer in postra sched.
Updated tests for the new schedules.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D109536

Change-Id: Ia86ba2ae168f12fb34b4d8efdab491f84d936cde

3 years ago[lld/mac] Search .tbd before binary for framework files too
Nico Weber [Tue, 14 Sep 2021 16:23:41 +0000 (12:23 -0400)]
[lld/mac] Search .tbd before binary for framework files too

This matters for example for the iPhoneSimulator14.0.sdk, which has
a System/Library/Frameworks/UIKit.framework/UIKit that has
LC_BUILD_VERSION with minos of 14.0, so linking against that file
will produce warnings like:

   .../iPhoneSimulator14.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit
   has version 14.0.0, which is newer than target minimum of 12.0.0

when targeting x86_64-apple-ios12.0-simulator. That doens't happen when
linking against UIKit.tbd instead, obviously.

Linking with RC_TRACE_DYLIB_SEARCHING=1 shows that ld64 also searches
the tbd file first, and we already get that right for non-framework
dylibs.

Fixes crbug.com/1249456.

Differential Revision: https://reviews.llvm.org/D109768

3 years ago[llvm-profgen] Ignore broken LBR samples
Hongtao Yu [Fri, 10 Sep 2021 23:34:49 +0000 (16:34 -0700)]
[llvm-profgen] Ignore broken LBR samples

Perf script can sometimes give disordered LBR samples like below.

```
          b022500
          32de0044
          3386e1d1
      7f118e05720c
      7f118df2d81f
 0x2a0b9622/0x2a0b9610/P/-/-/1  0x2a0b79ff/0x2a0b9618/P/-/-/2  0x2a0b7a4a/0x2a0b79e8/P/-/-/1  0x2a0b7a33/0x2a0b7a46/P/-/-/1  0x2a0b7a42/0x2a0b7a23/P/-/-/1  0x2a0b7a21/0x2a0b7a37/P/-/-/2  0x2a0b79e6/0x2a0b7a07/P/-/-/1  0x2a0b79d4/0x2a0b79dc/P/-/-/2  0x2a0b7a03/0x2a0b79aa/P/-/-/1  0x2a0b79a8/0x2a0b7a00/P/-/-/234  0x2a0b9613/0x2a0b7930/P/-/-/1  0x2a0b9622/0x2a0b9610/P/-/-/1  0x2a0b79ff/0x2a0b9618/P/-/-/2  0x2a0b7a4a/0x2aWarning:
Processed 10263226 events and lost 1 chunks!

```
 Note that the last LBR record `0x2a0b7a4a/0x2aWarning:` . Currently llvm-profgen does not detect that and as a result an uninitialized branch target value will be used. The uninitialized value can cause creepy instruction ranges created which which in turn will result in a completely wrong profile. An example is like

```

 .... @ _ZN5folly13loadUnalignedIsEET_PKv]:18446744073709551615:18446744073709551615
 1: 18446744073709551615
 !CFGChecksum: 4294967295
 !Attributes: 0
```

Reviewed By: wenlei, wlei

Differential Revision: https://reviews.llvm.org/D109637

3 years ago[VPlan] Queue (block, operand) pairs together (NFC).
Florian Hahn [Tue, 14 Sep 2021 18:01:28 +0000 (19:01 +0100)]
[VPlan] Queue (block, operand) pairs together (NFC).

Instead of discovering the sink-to block for each operand in the main
loop, the sink-to block can instead be directly queued with the
operands.

This simplifies processing in the main loop and is a NFC change split
off from D104254 as suggested there.

3 years ago[Sanitizers] intercept fparseln on freebsd
David Carlier [Tue, 14 Sep 2021 18:13:45 +0000 (19:13 +0100)]
[Sanitizers] intercept fparseln on freebsd

Reviewed By: vitalybuka, emaste

Differential Revision: https://reviews.llvm.org/D109753

3 years agoPut code that avoids heapifying local blocks behind a flag
Walter Lee [Wed, 8 Sep 2021 01:56:02 +0000 (21:56 -0400)]
Put code that avoids heapifying local blocks behind a flag

This change puts the functionality in commit
c5792aa90fa45a1842f190c146f19e2c71ea6fbd behind a flag that is off by
default.  The original commit is not in Apple's Clang fork (and blocks
are an Apple extension in the first place), and there is one known
issue that needs to be addressed before it can be enabled safely.

Differential Revision: https://reviews.llvm.org/D108243

3 years ago[gn build] Port 49992c04148e
LLVM GN Syncbot [Tue, 14 Sep 2021 17:54:35 +0000 (17:54 +0000)]
[gn build] Port 49992c04148e

3 years agoRevert "Revert "clang-tidy: introduce readability-containter-data-pointer check""
Saleem Abdulrasool [Tue, 14 Sep 2021 17:51:19 +0000 (10:51 -0700)]
Revert "Revert "clang-tidy: introduce readability-containter-data-pointer check""

This reverts commit 76dc8ac36d07cebe8cfe8fe757323562bb36df94.

Restore the change.  The test had an incorrect negative from testing.
The test is expected to trigger a failure as mentioned in the review
comments.  This corrects the test and should resolve the failure.

3 years agoRevert "[Dexter] Improve performance by evaluating expressions only when needed"
Stephen Tozer [Tue, 14 Sep 2021 17:23:39 +0000 (18:23 +0100)]
Revert "[Dexter] Improve performance by evaluating expressions only when needed"

Reverted due to build failure on greendragon lldb build.

This reverts commit 9bbc0c1ffb47f9cf4c9d8e9a0e8100002fe5aafb.

3 years ago[StackColoring] Fix a debug invariance problem
Bjorn Pettersson [Tue, 14 Sep 2021 13:06:28 +0000 (15:06 +0200)]
[StackColoring] Fix a debug invariance problem

Ignore dbg instructions when collecting stack slot markers. This is
to make sure the coloring is invariant regarding presence of dbg
instructions (even in cases when the dbg instructions might be
badly placed in the input).

Differential Revision: https://reviews.llvm.org/D109758

3 years ago[StackColoring] Pre-commit of test case showing a debug invariance bug
Bjorn Pettersson [Tue, 14 Sep 2021 13:01:58 +0000 (15:01 +0200)]
[StackColoring] Pre-commit of test case showing a debug invariance bug

Having DBG_VALUE instructions referencing a stack slot while being outside
of the LIFETIME_START/LIFETIME_END markers for that stack slot is perhaps
not always ideal (from a debugging perspective), but it might happen during
codegen that we end up with such situations (e.g. positioning of the
DBG_VALUE instruction for a SDDbgOperand::FRAMEIX at ISel is a bit sloppy
in that context).

This patch adds a test case showing that StackColoring currently isn't
debug invariant, and that the position of DBG_VALUE instructions referencing
the stack slots might impact the decision making regarding stack slot reuse.

Differential Revision: https://reviews.llvm.org/D109757

3 years ago[NFC] Add trailing comma on TYPED_TEST_SUITE
Alexandre Rames [Tue, 14 Sep 2021 16:56:57 +0000 (09:56 -0700)]
[NFC] Add trailing comma on TYPED_TEST_SUITE

This avoids a -pedantic warning:
warning: ISO C++11 requires at least one argument for the "..." in a variadic macro

See also https://github.com/google/googletest/issues/2271

3 years agoRevert "clang-tidy: introduce readability-containter-data-pointer check"
Nico Weber [Tue, 14 Sep 2021 16:37:10 +0000 (12:37 -0400)]
Revert "clang-tidy: introduce readability-containter-data-pointer check"

This reverts commit d0d9e6f0849b2e76e980e2edf365302f47f4e35f.
Breaks tests, see e.g. https://lab.llvm.org/buildbot/#/builders/188/builds/3326

3 years ago[gn build] Use lib_dirs instead of qualified path in libs for diaguids.lib
Nico Weber [Tue, 14 Sep 2021 16:31:41 +0000 (12:31 -0400)]
[gn build] Use lib_dirs instead of qualified path in libs for diaguids.lib

Follow-up to D109708: Using lib_dirs means this will work with ancient gn binaries.

Change the toolchain definitions to make lib_dirs have the right effect, and
pull out lib_switch of each of the tools while here.

This means we now do pass /LIBPATH: to link.exe, but since we invoke it directly
and not through clang-cl, this doesn't actually require D109624. And since this
is built in to GN, we don't need a config to push the flag to dependents.

This is arguably a bit more idiomatic, and it doesn't require folks to update
their GN binaries. No effective behavior change.

Differential Revision: https://reviews.llvm.org/D109763

3 years ago[flang][OpenMP] Add semantic check for threadprivate directive
PeixinQiao [Tue, 14 Sep 2021 16:22:03 +0000 (00:22 +0800)]
[flang][OpenMP] Add semantic check for threadprivate directive

This patch implements the following check for THREADPRIVATE construct:
```
A variable that is part of another variable (as an array, structure
element or type parameter inquiry) cannot appear in a threadprivate
directive.
```

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D109685

3 years ago[IPO] Use make_early_inc_range (NFC)
Kazu Hirata [Tue, 14 Sep 2021 15:59:35 +0000 (08:59 -0700)]
[IPO] Use make_early_inc_range (NFC)

3 years ago[mli][linalg] Reuse getValueOrCreateConstantIndexOp method (NFC).
Tobias Gysi [Tue, 14 Sep 2021 15:11:45 +0000 (15:11 +0000)]
[mli][linalg] Reuse getValueOrCreateConstantIndexOp method (NFC).

Use getValueOrCreateConstantIndexOp introduced by https://reviews.llvm.org/D109601 in multiple places in LinalgOps.cpp.

Reviewed By: nicolasvasilache, springerm

Differential Revision: https://reviews.llvm.org/D109756

3 years ago[JITLink] Allow moving a Symbol to a Block in a different Section
Ben Langmuir [Tue, 14 Sep 2021 14:58:09 +0000 (07:58 -0700)]
[JITLink] Allow moving a Symbol to a Block in a different Section

When moving a Symbol between Blocks that are in different Sections,
update the symbol tables for each Section. Otherwise
symbol.getBlock().getSection() will not match the contents of
Section::symbols(), which asserts during linking.

Differential Revision: https://reviews.llvm.org/D109724

3 years agoclang-tidy: introduce readability-containter-data-pointer check
Saleem Abdulrasool [Sun, 29 Aug 2021 05:05:59 +0000 (22:05 -0700)]
clang-tidy: introduce readability-containter-data-pointer check

This introduces a new check, readability-containter-data-pointer.  This
check is meant to catch the cases where the user may be trying to
materialize the data pointer by taking the address of the 0-th member of
a container.  With C++11 or newer, the `data` member should be used for
this.  This provides the following benefits:

- `.data()` is easier to read than `&[0]`
- it avoids an unnecessary re-materialization of the pointer
  * this doesn't matter in the case of optimized code, but in the case
    of unoptimized code, this will be visible
- it avoids a potential invalid memory de-reference caused by the
  indexing when the container is empty (in debug mode, clang will
  normally optimize away the re-materialization in optimized builds).

The small potential behavioural change raises the question of where the
check should belong.  A reasoning of defense in depth applies here, and
this does an unchecked conversion, with the assumption that users can
use the static analyzer to catch cases where we can statically identify
an invalid memory de-reference.  For the cases where the static analysis
is unable to prove the size of the container, UBSan can be used to track
the invalid access.

Special thanks to Aaron Ballmann for the discussion on whether this
check would be useful and where to place it.

This also partially resolves PR26817!

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D108893

3 years ago[IR] Reduce max supported integer from 2^24-1 to 2^23.
Craig Topper [Tue, 14 Sep 2021 14:33:33 +0000 (07:33 -0700)]
[IR] Reduce max supported integer from 2^24-1 to 2^23.

SelectionDAG will promote illegal types up to a power of 2 before
splitting down to a legal type. This will create an IntegerType
with a bit width that must be <= MAX_INT_BITS. This places an
effective upper limit on any type of 2^23 so that we don't try
create a 2^24 type.

I considered putting a fatal error somewhere in the path from
TargetLowering::getTypeConversion down to IntegerType::get, but
limiting the type in IR seemed better.

This breaks backwards compatibility with IR that is using a really
large type. I suspect such IR is going to be very rare due to the
the compile time costs such a type likely incurs.

Prevents the ICE in PR51829.

Reviewed By: efriedma, aaron.ballman

Differential Revision: https://reviews.llvm.org/D109721

3 years agoFix test failure created by ef8c9135efcb
Sam Clegg [Tue, 14 Sep 2021 14:34:34 +0000 (07:34 -0700)]
Fix test failure created by ef8c9135efcb

Followup to https://reviews.llvm.org/D108877 to fix test
failure.

3 years agoFix a unittest file after D108695 when Z3 is enabled
Kristóf Umann [Tue, 14 Sep 2021 14:10:29 +0000 (16:10 +0200)]
Fix a unittest file after D108695 when Z3 is enabled

3 years ago[clangd] Ignore ObjC `id` and `instancetype` in FindTarget
David Goldman [Mon, 23 Aug 2021 14:30:49 +0000 (10:30 -0400)]
[clangd] Ignore ObjC `id` and `instancetype` in FindTarget

Even though they're implemented via typedefs, we typically
want to treat them like keywords.

We could add hover information / xrefs, but it's very unlikely
to provide any value.

Differential Revision: https://reviews.llvm.org/D108556

3 years ago[WebAssembly] Allow import and export of TLS symbols between DSOs
Sam Clegg [Thu, 26 Aug 2021 19:29:32 +0000 (15:29 -0400)]
[WebAssembly] Allow import and export of TLS symbols between DSOs

We previously had a limitation that TLS variables could not
be exported (and therefore could also not be imported).  This
change removed that limitation.

Differential Revision: https://reviews.llvm.org/D108877

3 years ago[PowerPC] Exploit Prefixed Load/Stores using the refactored Load/Store Implementation
Amy Kwan [Mon, 13 Sep 2021 17:26:11 +0000 (12:26 -0500)]
[PowerPC] Exploit Prefixed Load/Stores using the refactored Load/Store Implementation

This patch exploits the prefixed load and store instructions utilizing the
refactored load/store implementation introduced in D93370.

Prefixed load and store instructions are emitted whenever we are loading or
storing a value with an offset that fits into a 34-bit signed immediate.
Patterns for the prefixed load and stores are added in this patch, as well as
the implementation that detects when we are loading and storing a value with an
offset that fits in 34-bits.

Differential Revision: https://reviews.llvm.org/D96075

3 years agoRemove incorrect comment in getSingleUndroppableUse. NFC
Anna Thomas [Mon, 13 Sep 2021 19:41:40 +0000 (15:41 -0400)]
Remove incorrect comment in getSingleUndroppableUse. NFC

We traverse the entire use list to find the undroppable use.