platform/upstream/llvm.git
5 years ago[lldb][NFC] Remove DiagnosticManager::CopyDiagnostics
Raphael Isemann [Mon, 29 Jul 2019 07:37:17 +0000 (07:37 +0000)]
[lldb][NFC] Remove DiagnosticManager::CopyDiagnostics

The Diagnostic class in LLDB is suppossed to be inherited from,
so just copying the diagnostics like this is wrong. The function
is also unused, so lets just get rid of it instead of creating
some cloning facility for it.

llvm-svn: 367201

5 years agoReturn early. NFC.
Rui Ueyama [Mon, 29 Jul 2019 05:24:51 +0000 (05:24 +0000)]
Return early. NFC.

llvm-svn: 367200

5 years agoImprove MSVC visualizers for DeclSpec and TemplateName
Mike Spertus [Mon, 29 Jul 2019 03:34:40 +0000 (03:34 +0000)]
Improve MSVC visualizers for DeclSpec and TemplateName

DeclSpec now shows the TypeRep, ExprRep, or DeclRep as appropriate
TemplateName decodes and displays the StorageType
A few minor refinements to other types

llvm-svn: 367199

5 years ago[X86] Don't use PMADDWD for vector add reductions of multiplies if the mul inputs...
Craig Topper [Mon, 29 Jul 2019 01:36:58 +0000 (01:36 +0000)]
[X86] Don't use PMADDWD for vector add reductions of multiplies if the mul inputs have an additional user.

The pmaddwd inserts a truncate, if that truncate would end up
creating additional instructions instead of making a zext
narrower, then we shouldn't do it.

I've restricted this to only sse4.1 targets since on prior
targets the zext will be done in stages. So the truncate will
probably not create additional instructions. Might need some
more investigation of mul shrinking and the other pmaddwd
transform to be sure this is the right decision.

There might be a slight regression on AVX1 targets due to add
splitting. Hard to say for sure. Maybe we need to look into
using the vector reduction flag to use 2 narrow loads and a
blend instead of extracting and inserting.

llvm-svn: 367198

5 years ago[X86] Add test cases to show missing one use check in combineLoopMAddPattern.
Craig Topper [Mon, 29 Jul 2019 01:36:54 +0000 (01:36 +0000)]
[X86] Add test cases to show missing one use check in combineLoopMAddPattern.

llvm-svn: 367197

5 years ago[NFC][InstCombine] Revisit tests in shift-amount-reassociation-with-truncation-shl.ll
Roman Lebedev [Sun, 28 Jul 2019 21:31:58 +0000 (21:31 +0000)]
[NFC][InstCombine] Revisit tests in shift-amount-reassociation-with-truncation-shl.ll

llvm-svn: 367196

5 years ago[X86] In combineLoopMAddPattern and combineLoopSADPattern, preserve the vector reduct...
Craig Topper [Sun, 28 Jul 2019 18:45:42 +0000 (18:45 +0000)]
[X86] In combineLoopMAddPattern and combineLoopSADPattern, preserve the vector reduction flag on the final add. Handle unrolled loops by letting DAG combine revisit.

This reverts r340478 and r340631 and replaces them with a simpler
method of just letting DAG combine revisit the nodes to handle
the other operand.

llvm-svn: 367195

5 years ago[InstCombine] fold fsub+fneg with fdiv/fmul between
Sanjay Patel [Sun, 28 Jul 2019 17:10:06 +0000 (17:10 +0000)]
[InstCombine] fold fsub+fneg with fdiv/fmul between

The backend already does this via isNegatibleForFree(),
but we may want to alter the fneg IR canonicalizations
that currently exist, so we need to try harder to fold
fneg in IR to avoid regressions.

llvm-svn: 367194

5 years agoBuildbot fix for r367190
Gabor Borsik [Sun, 28 Jul 2019 14:57:41 +0000 (14:57 +0000)]
Buildbot fix for r367190

llvm-svn: 367193

5 years ago[ARM] MVE VPNOT
David Green [Sun, 28 Jul 2019 14:07:48 +0000 (14:07 +0000)]
[ARM] MVE VPNOT

This adds the patterns required to transform xor P0, -1 to a VPNOT. The
instruction operands have to change a little for this, adding an in and an out
VCCR reg and using a custom DecodeMVEVPNOT for the decode.

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

llvm-svn: 367192

5 years ago[ARM] Better patterns for fp <> predicate vectors
David Green [Sun, 28 Jul 2019 13:53:39 +0000 (13:53 +0000)]
[ARM] Better patterns for fp <> predicate vectors

These are some better patterns for converting between predicates and floating
points. Much like the extends, we select "1"/"-1" or "0" depending on the
predicate value. Or we perform a compare against 0 to convert to a predicate.

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

llvm-svn: 367191

5 years ago[analyzer] Add yaml parser to GenericTaintChecker
Gabor Borsik [Sun, 28 Jul 2019 13:38:04 +0000 (13:38 +0000)]
[analyzer] Add yaml parser to GenericTaintChecker

While we implemented taint propagation rules for several
builtin/standard functions, there's a natural desire for users to add
such rules to custom functions.

A series of patches will implement an option that allows users to
annotate their functions with taint propagation rules through a YAML
file. This one adds parsing of the configuration file, which may be
specified in the commands line with the analyzer config:
alpha.security.taint.TaintPropagation:Config. The configuration may
contain propagation rules, filter functions (remove taint) and sink
functions (give a warning if it gets a tainted value).

I also added a new header for future checkers to conveniently read YAML
files as checker options.

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

llvm-svn: 367190

5 years ago[NFC][InstCombine] Shift amount reassociation: can have trunc between shl's
Roman Lebedev [Sun, 28 Jul 2019 13:13:46 +0000 (13:13 +0000)]
[NFC][InstCombine] Shift amount reassociation: can have trunc between shl's

https://rise4fun.com/Alive/OQbM
Not so simple for lshr/ashr, so those maybe later.

https://bugs.llvm.org/show_bug.cgi?id=42391

llvm-svn: 367189

5 years agoDon't initialize interceptor_metadata_map unless SI_POSIX is set
Eugene Leviant [Sun, 28 Jul 2019 08:58:44 +0000 (08:58 +0000)]
Don't initialize interceptor_metadata_map unless SI_POSIX is set

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

llvm-svn: 367188

5 years ago[Attributor] Deduce "align" attribute
Hideto Ueno [Sun, 28 Jul 2019 07:04:01 +0000 (07:04 +0000)]
[Attributor] Deduce "align" attribute

Summary:
Deduce "align" attribute in attributor.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 367187

5 years ago[lldb] Also include the array definition in CommandOptions.inc
Raphael Isemann [Sun, 28 Jul 2019 06:24:07 +0000 (06:24 +0000)]
[lldb] Also include the array definition in CommandOptions.inc

Summary:
Right now our CommandOptions.inc only generates the initializer for the options list but
not the array declaration boilerplate around it. As the array definition is identical for all arrays,
we might as well also let the CommandOptions.inc generate it alongside the initializers.

This patch will also allow us to generate additional declarations related to that option list in
the future (e.g. a enum class representing the specific options which would make our
handling code less prone).

This patch also fixes a few option tables that didn't follow our naming style.

Reviewers: JDevlieghere

Reviewed By: JDevlieghere

Subscribers: abidh, lldb-commits

Tags: #lldb

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

llvm-svn: 367186

5 years ago[IR] Fix getPointerAlignment for CallBase
Hideto Ueno [Sun, 28 Jul 2019 06:17:46 +0000 (06:17 +0000)]
[IR] Fix getPointerAlignment for CallBase

Summary:
In current getPointerAlignemnt implementation, CallBase.getPointerAlignement(..) checks only parameter attriutes in the callsite.  For example,

```
declare align 8 i8* @foo()

define void @bar() {
    %a = tail call align 8 i8* @foo() ; getPointerAlignment returns 8
    %b = tail call i8* @foo() ; getPointerAlignemnt returns 0
    ret void
}
```

This patch will fix the problem.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 367185

5 years ago[FunctionAttrs] Annotate "willreturn" for intrinsics
Hideto Ueno [Sun, 28 Jul 2019 06:09:56 +0000 (06:09 +0000)]
[FunctionAttrs] Annotate "willreturn" for intrinsics

Summary:
In D62801, new function attribute `willreturn` was introduced. In short, a function with `willreturn` is guaranteed to come back to the call site(more precise definition is in LangRef).

In this patch, willreturn is annotated for LLVM intrinsics.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: jvesely, nhaehnle, sstefan1, llvm-commits

Tags: #llvm

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

llvm-svn: 367184

5 years agoFix PR35637: suboptimal codegen for `vector<unsigned char>`.
Eric Fiselier [Sun, 28 Jul 2019 04:37:02 +0000 (04:37 +0000)]
Fix PR35637: suboptimal codegen for `vector<unsigned char>`.

The optimizer is petulant and temperamental. In this case LLVM failed to lower
the the "insert at end" loop used by`vector<unsigned char>` to a `memset` despite
`memset` being substantially faster over a range of bytes.

LLVM has the ability to lower loops to `memset` whet appropriate, but the
odd nature of libc++'s loops prevented the optimization from taking places.

This patch addresses the issue by rewriting the loops from the form
`do [ ... --__n; } while (__n > 0);` to instead use a for loop over a pointer
range (For example: `for (auto *__i = ...; __i < __e; ++__i)`).

This patch also rewrites the asan annotations to unposion all additional memory
at the start of the loop instead of once per iterations. This could potentially
permit false negatives where the constructor of element N attempts to access
element N + 1 during its construction.

The before and after results for the `BM_ConstructSize/vector_byte/5140480_mean`
benchmark (run 5 times) are:

--------------------------------------------------------------------------------------------
Benchmark                                                 Time             CPU   Iterations
--------------------------------------------------------------------------------------------
Before
------
BM_ConstructSize/vector_byte/5140480_mean          12530140 ns     12469693 ns            N/A
BM_ConstructSize/vector_byte/5140480_median        12512818 ns     12445571 ns            N/A
BM_ConstructSize/vector_byte/5140480_stddev          106224 ns       107907 ns            5
-----
After
-----
BM_ConstructSize/vector_byte/5140480_mean            167285 ns       166500 ns            N/A
BM_ConstructSize/vector_byte/5140480_median          166749 ns       166069 ns            N/A
BM_ConstructSize/vector_byte/5140480_stddev            3242 ns         3184 ns            5

llvm-svn: 367183

5 years ago[Driver] Additional fixup of NOWARN test case from r367165
Bjorn Pettersson [Sat, 27 Jul 2019 20:22:47 +0000 (20:22 +0000)]
[Driver] Additional fixup of NOWARN test case from r367165

Same kind of fix as in r367176, but for "RUN on line 76"
this time.

I'll ask for a post-commit review, to ensure this
matches the intention with the test added in r367165.
But I think this at least will make the buildbots a
little bit happier.

llvm-svn: 367182

5 years ago[DAGCombine] narrowInsertExtractVectorBinOp - early out for illegal op. NFCI.
Simon Pilgrim [Sat, 27 Jul 2019 19:42:58 +0000 (19:42 +0000)]
[DAGCombine] narrowInsertExtractVectorBinOp - early out for illegal op. NFCI.

If the subvector binop is illegal then early-out and avoid the subvector searches.

llvm-svn: 367181

5 years agoStricter check for the memory access.
Joerg Sonnenberger [Sat, 27 Jul 2019 18:57:59 +0000 (18:57 +0000)]
Stricter check for the memory access.

The current pattern would trigger for scheduling changes of the
post-load computation, since those are commutable with the inline asm.
Avoid this by explicitly check the order of load vs asm block.

llvm-svn: 367180

5 years agoRegenerate UXTB tests
Simon Pilgrim [Sat, 27 Jul 2019 18:44:15 +0000 (18:44 +0000)]
Regenerate UXTB tests

llvm-svn: 367179

5 years ago[clangd] Fix NDEBUG build problem introduced by rL366698
Bjorn Pettersson [Sat, 27 Jul 2019 17:09:15 +0000 (17:09 +0000)]
[clangd] Fix NDEBUG build problem introduced by rL366698

Sprinkled some #ifndef NDEBUG in Selection.cpp to make
it possible to build with NDEBUG defined.

The problem was introduced in rL366698 when using dlog
for some debug printouts. The dlog macro expands to
DEBUG_WITH_TYPE, which isn't using it's arguments in
optimized builds (when NDEBUG is defined).

llvm-svn: 367178

5 years ago[Driver] Fix "unannotated fall-through between switch labels". NFC
Bjorn Pettersson [Sat, 27 Jul 2019 17:09:08 +0000 (17:09 +0000)]
[Driver] Fix "unannotated fall-through between switch labels". NFC

Just a simple fix of Werror problem after r367165.

llvm-svn: 367177

5 years agoAttempt to make test in r367165 more robust.
Nico Weber [Sat, 27 Jul 2019 16:57:19 +0000 (16:57 +0000)]
Attempt to make test in r367165 more robust.

Some people were seeing this failure:

```
: 'RUN: at line 83';   clang -mrelax-all -fno-integrated-as /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -S 2>&1 \
         | /FileCheck --check-prefix=WARN --allow-empty clang/test/Driver/as-options.s
--
Exit Code: 1

Command Output (stderr):
--
clang/test/Driver/as-options.s:66:16: error: NOWARN-NOT: excluded string found in input
// NOWARN-NOT: unused
               ^
<stdin>:1:95: note: found here
clang-10: warning: clang/test/Driver/as-options.s: 'assembler' input unused [-Wunused-command-line-argument]
```

Maybe this helps with that.

llvm-svn: 367176

5 years ago[AMDGPU] Regenerate tests.
Simon Pilgrim [Sat, 27 Jul 2019 14:32:23 +0000 (14:32 +0000)]
[AMDGPU] Regenerate tests.

To help show the diffs from an upcoming SimplifyDemandedBits patch.

llvm-svn: 367175

5 years ago[TargetLowering] SimplifyMultipleUseDemandedBits - add BITCAST pass through support...
Simon Pilgrim [Sat, 27 Jul 2019 14:11:59 +0000 (14:11 +0000)]
[TargetLowering] SimplifyMultipleUseDemandedBits - add BITCAST pass through support (Reapplied)

This allows us to peek through BITCASTs, attempt to simplify the source operand, and then bitcast back.

This reapplies rL367091 which was reverted at rL367118 - we were inconsistently peeking through the bitcasts to the source value.

Fixes PR42777

llvm-svn: 367174

5 years ago[InstSimplify] remove quadratic time looping (PR42771)
Sanjay Patel [Sat, 27 Jul 2019 14:05:51 +0000 (14:05 +0000)]
[InstSimplify] remove quadratic time looping (PR42771)

The test case from:
https://bugs.llvm.org/show_bug.cgi?id=42771
...shows a ~30x slowdown caused by the awkward loop iteration (rL207302) that is
seemingly done just to avoid invalidating the instruction iterator. We can instead
delay instruction deletion until we reach the end of the block (or we could delay
until we reach the end of all blocks).

There's a test diff here for a degenerate case with llvm.assume that is not
meaningful in itself, but serves to verify this change in logic.

This change probably doesn't result in much overall compile-time improvement
because we call '-instsimplify' as a standalone pass only once in the standard
-O2 opt pipeline currently.

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

llvm-svn: 367173

5 years ago[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDemandedBit...
Simon Pilgrim [Sat, 27 Jul 2019 13:30:29 +0000 (13:30 +0000)]
[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDemandedBits handler (Reapplied)

Recommit rL367100 which was reverted at rL367141. Until PR42777 is fixed, we no longer get the benefits of peeking through bitcasts but it does still remove a GetDemandedBits user and gives us the equivalent combines.

llvm-svn: 367172

5 years ago[SelectionDAG] Check for any recursion depth greater than or equal to limit instead...
Simon Pilgrim [Sat, 27 Jul 2019 12:48:46 +0000 (12:48 +0000)]
[SelectionDAG] Check for any recursion depth greater than or equal to limit instead of just equal the limit.

If anything called the recursive isKnownNeverNaN/computeKnownBits/ComputeNumSignBits/SimplifyDemandedBits/SimplifyMultipleUseDemandedBits with an incorrect depth then we could continue to recurse if we'd already exceeded the depth limit.

This replaces the limit check (Depth == 6) with a (Depth >= 6) to make sure that we don't circumvent it.

This causes a couple of regressions as a mixture of calls (SimplifyMultipleUseDemandedBits + combineX86ShufflesRecursively) were calling with depths that were already over the limit. I've fixed SimplifyMultipleUseDemandedBits to not do this. combineX86ShufflesRecursively is trickier as we get a lot of regressions if we reduce its own limit from 8 to 6 (it also starts at Depth == 1 instead of Depth == 0 like the others....) - I'll see what I can do in future patches.

llvm-svn: 367171

5 years ago[compiler-rt] Fix running tests on macOS when XCode is not installed
Alexander Richardson [Sat, 27 Jul 2019 12:30:15 +0000 (12:30 +0000)]
[compiler-rt] Fix running tests on macOS when XCode is not installed

Summary:
If XCode is not installed, `xcodebuild -version -sdk macosx Path` will give
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
In this case the variable OSX_SYSROOT will be empty and
OSX_SYSROOT_FLAG is set to "-isysroot" (without a path).
This then causes the CompilerRTUnitTestCheckCxx target failed to for me
because "${COMPILER_RT_TEST_COMPILER} ${OSX_SYSROOT_FLAG} -E" expanded to
"clang -isysroot -E". This results in a warning "sysroot -E does not exist"
and the target fails to run because the C++ headers cannot be found.

Reviewers: beanz, kubamracek

Reviewed By: beanz

Subscribers: dberris, mgorny, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 367170

5 years ago[TargetLowering] Add depth limit to SimplifyMultipleUseDemandedBits
Simon Pilgrim [Sat, 27 Jul 2019 12:23:36 +0000 (12:23 +0000)]
[TargetLowering] Add depth limit to SimplifyMultipleUseDemandedBits

We're getting reports of massive compile time increases because SimplifyMultipleUseDemandedBits was losing track of the depth and not earlying-out. No repro yet, but consider this a pre-emptive commit.

llvm-svn: 367169

5 years ago[mips] Add (dis)assembler tests for beqzl and bnezl instructions. NFC
Simon Atanasyan [Sat, 27 Jul 2019 08:13:27 +0000 (08:13 +0000)]
[mips] Add (dis)assembler tests for beqzl and bnezl instructions. NFC

llvm-svn: 367168

5 years agoclang-format: Support `if CONSTEXPR` if CONSTEXPR is a macro.
Nico Weber [Sat, 27 Jul 2019 02:41:40 +0000 (02:41 +0000)]
clang-format: Support `if CONSTEXPR` if CONSTEXPR is a macro.

This is like r305666 (which added support for `if constexpr`) except
that it allows a macro name after the if.

This is slightly tricky for two reasons:

1. r305666 didn't add test coverage for all cases where it added a
   kw_constexpr, so I had to figure out what all the added cases were
   for. I now added tests for all `if constexpr` bits that didn't have
   tests. (This took a while, see e.g. https://reviews.llvm.org/D65223)

2. Parsing `if <ident> (` as an if means that `#if defined(` and
   `#if __has_include(` parse as ifs too. Add some special-case code
   to prevent this from happening where it's incorrect.

Fixes PR39248.

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

llvm-svn: 367167

5 years agoRevert "[ARM] Set default alignment to 64bits"
Petr Hosek [Sat, 27 Jul 2019 01:59:23 +0000 (01:59 +0000)]
Revert "[ARM] Set default alignment to 64bits"

This reverts commit r367119.

This broke several bots:

http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/26891/steps/ninja%20check%201/logs/FAIL%3A%20Clang%3A%3Aexception-alignment.cpp
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/245/consoleFull

llvm-svn: 367166

5 years agodriver: Don't warn about assembler flags being unused when not assembling; different...
Nico Weber [Sat, 27 Jul 2019 01:13:00 +0000 (01:13 +0000)]
driver: Don't warn about assembler flags being unused when not assembling; different approach

This morally relands r365703 (and r365714), originally reviewed at
https://reviews.llvm.org/D64527, but with a different implementation.

Relanding the same approach with a fix for the revert reason got a bit
involved (see https://reviews.llvm.org/D65108) so use a simpler approach
with a more localized implementation (that in return duplicates code
a bit more).

This approach also doesn't validate flags for the integrated assembler
if the assembler step doesn't run.

Fixes PR42066.

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

llvm-svn: 367165

5 years ago[AArch64][GlobalISel] Implement narrowing of G_SEXT.
Amara Emerson [Fri, 26 Jul 2019 23:46:38 +0000 (23:46 +0000)]
[AArch64][GlobalISel] Implement narrowing of G_SEXT.

We need this to narrow a sext to s128.

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

llvm-svn: 367164

5 years ago[AArch64][GlobalISel] Select @llvm.aarch64.stlxr for 32-bit pointers
Jessica Paquette [Fri, 26 Jul 2019 23:28:53 +0000 (23:28 +0000)]
[AArch64][GlobalISel] Select @llvm.aarch64.stlxr for 32-bit pointers

Add partial instruction selection for intrinsics like this:

```
declare i32 @llvm.aarch64.stlxr(i64, i32*)
```

(This only handles the case where a G_ZEXT is feeding the intrinsic.)

Also make sure that the added store instruction actually has the memory op from
the original G_STORE.

Update select-stlxr-intrin.mir and arm64-ldxr-stxr.ll.

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

llvm-svn: 367163

5 years ago[Remarks] Silence Wreturn-type warning
Francis Visoiu Mistrih [Fri, 26 Jul 2019 22:42:54 +0000 (22:42 +0000)]
[Remarks] Silence Wreturn-type warning

Shows up here: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/27771/steps/annotate/logs/stdio.

llvm-svn: 367162

5 years ago[Remarks] Update unit test to use StringRef::lower
Francis Visoiu Mistrih [Fri, 26 Jul 2019 22:36:20 +0000 (22:36 +0000)]
[Remarks] Update unit test to use StringRef::lower

llvm-svn: 367161

5 years agoRevert [IPSCCP] Add assertion to surface cases where we zap returns with overdefined...
Florian Hahn [Fri, 26 Jul 2019 22:14:08 +0000 (22:14 +0000)]
Revert [IPSCCP] Add assertion to surface cases where we zap returns with overdefined users.

This reverts r366998 (git commit 5354c83ece00690b4dbfa47925f8f5a8f33f1d9e)

This breaks a linux kernel build and we have reproducer to investigate.

llvm-svn: 367160

5 years agoFix remarks unit test on Windows
Reid Kleckner [Fri, 26 Jul 2019 22:10:44 +0000 (22:10 +0000)]
Fix remarks unit test on Windows

"no such file or directory" vs "No such file or directory"

llvm-svn: 367159

5 years ago[NewPM] Run avx*-builtins.c tests under the new pass manager only
Leonard Chan [Fri, 26 Jul 2019 21:19:37 +0000 (21:19 +0000)]
[NewPM] Run avx*-builtins.c tests under the new pass manager only

This patch changes the following tests to run under the new pass manager only:

```
Clang :: CodeGen/avx512-reduceMinMaxIntrin.c (1 of 4)
Clang :: CodeGen/avx512vl-builtins.c (2 of 4)
Clang :: CodeGen/avx512vlbw-builtins.c (3 of 4)
Clang :: CodeGen/avx512f-builtins.c (4 of 4)
```

The new PM added extra bitcasts that weren't checked before. For
reduceMinMaxIntrin.c, the issue was mostly the alloca's being in a different
order. Other changes involved extra bitcasts, and differently ordered loads and
stores, but the logic should still be the same.

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

llvm-svn: 367157

5 years ago[InstCombine] add tests for fsub with negated operand; NFC
Sanjay Patel [Fri, 26 Jul 2019 21:12:22 +0000 (21:12 +0000)]
[InstCombine] add tests for fsub with negated operand; NFC

llvm-svn: 367156

5 years agoReland: [Remarks] Support parsing remark metadata in the YAML remark parser
Francis Visoiu Mistrih [Fri, 26 Jul 2019 21:02:02 +0000 (21:02 +0000)]
Reland: [Remarks] Support parsing remark metadata in the YAML remark parser

This adds support to the yaml remark parser to be able to parse remarks
directly from the metadata.

This supports parsing separate metadata and following the external file
with the associated metadata, and also a standalone file containing
metadata + remarks all together.

Original llvm-svn: 367148
Revert llvm-svn: 367151

This has a fix for gcc builds.

llvm-svn: 367155

5 years ago[JumpThreading] Stop searching predecessor when the current bb is in a
Wei Mi [Fri, 26 Jul 2019 20:59:22 +0000 (20:59 +0000)]
[JumpThreading] Stop searching predecessor when the current bb is in a
unreachable loop.

updatePredecessorProfileMetadata in jumpthreading tries to find the
first dominating predecessor block for a PHI value by searching upwards
the predecessor block chain.

But jumpthreading may see some temporary IR state which contains
unreachable bb not being cleaned up. If an unreachable loop happens to
be on the predecessor block chain, keeping chasing the predecessor
block will run into an infinite loop.

The patch fixes it.

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

llvm-svn: 367154

5 years ago[CMake] Print the correct variables
Jonas Devlieghere [Fri, 26 Jul 2019 20:58:10 +0000 (20:58 +0000)]
[CMake] Print the correct variables

This didn't get updated after we decided to set PYTHON_MAJOR_VERSION and
PYTHON_MINOR_VERSION in find_python_libs_windows, instead of parsing the
variables ourselves.

llvm-svn: 367153

5 years ago[TableGen] Fix stale include paths
Jonas Devlieghere [Fri, 26 Jul 2019 20:55:07 +0000 (20:55 +0000)]
[TableGen] Fix stale include paths

This worked locally because the include files were not regenerated, but
fails when performing a clean build.

llvm-svn: 367152

5 years agoRevert "[Remarks] Support parsing remark metadata in the YAML remark parser"
Francis Visoiu Mistrih [Fri, 26 Jul 2019 20:54:44 +0000 (20:54 +0000)]
Revert "[Remarks] Support parsing remark metadata in the YAML remark parser"

This reverts r367148.

Seems to fail on
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/27768.

llvm-svn: 367151

5 years ago[CodeGen] fix test that broke with rL367146
Sanjay Patel [Fri, 26 Jul 2019 20:36:57 +0000 (20:36 +0000)]
[CodeGen] fix test that broke with rL367146

This should be fixed properly to not depend on LLVM (so much).

llvm-svn: 367149

5 years ago[Remarks] Support parsing remark metadata in the YAML remark parser
Francis Visoiu Mistrih [Fri, 26 Jul 2019 20:11:53 +0000 (20:11 +0000)]
[Remarks] Support parsing remark metadata in the YAML remark parser

This adds support to the yaml remark parser to be able to parse remarks
directly from the metadata.

This supports parsing separate metadata and following the external file
with the associated metadata, and also a standalone file containing
metadata + remarks all together.

llvm-svn: 367148

5 years agoPartially revert rC365414; `ln -n` is not portable
Hubert Tong [Fri, 26 Jul 2019 20:09:37 +0000 (20:09 +0000)]
Partially revert rC365414; `ln -n` is not portable

This restores the use of `rm` instead of the non-portable `ln -n`. Such
use being the status quo for the 12-month period between rC334972 and
rC365414.

llvm-svn: 367147

5 years ago[InstCombine] canonicalize negated operand of fdiv
Sanjay Patel [Fri, 26 Jul 2019 19:56:59 +0000 (19:56 +0000)]
[InstCombine] canonicalize negated operand of fdiv

This is a transform that we use with fmul, so use
it for fdiv too for consistency.

llvm-svn: 367146

5 years ago[InstCombine] add tests for fdiv with negated operand; NFC
Sanjay Patel [Fri, 26 Jul 2019 19:44:53 +0000 (19:44 +0000)]
[InstCombine] add tests for fdiv with negated operand; NFC

llvm-svn: 367145

5 years ago[CMake] Allow LLVM_EXTERNAL_<proj>_SOURCE_DIR to be overridden if it is
Yuanfang Chen [Fri, 26 Jul 2019 19:25:57 +0000 (19:25 +0000)]
[CMake] Allow LLVM_EXTERNAL_<proj>_SOURCE_DIR to be overridden if it is
empty.

This makes adding projects to LLVM_ENABLE_PROJECTS possible.
Also its type should be PATH.

https://bugs.llvm.org/show_bug.cgi?id=42698

Reviewers: beanz, greened, chapuni

Reviewed by: beanz

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

llvm-svn: 367144

5 years ago[MemorySSA & LoopPassManager] Analysis can be preserved only when all loop passes...
Alina Sbirlea [Fri, 26 Jul 2019 18:57:26 +0000 (18:57 +0000)]
[MemorySSA & LoopPassManager] Analysis can be preserved only when all loop passes preserve it.

llvm-svn: 367143

5 years agoadd 'a' to chmod in llvm-lipo executability tests
Bob Haarman [Fri, 26 Jul 2019 18:44:06 +0000 (18:44 +0000)]
add 'a' to chmod in llvm-lipo executability tests

Summary:
When specifying symbolic permissions with + or -, if none of
a/u/g/o are specified, bits set in the umask are not affected.
This caused the llvm-lipo executability tests to fail on some
systems, e.g. having an umask of 027 would cause chmod -x to not
clear the executable bit for others. This change instead
uses chmod a-x, which clears all the executable bits regardless
of umask.

Reviewers: smeenai, hans, anushabasana

Reviewed By: smeenai

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 367142

5 years agoRevert "[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDem...
Vlad Tsyrklevich [Fri, 26 Jul 2019 18:14:21 +0000 (18:14 +0000)]
Revert "[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDemandedBits handler."

This reverts r367100, it appears to be causing test failures after
Nico's revert of r367091.

llvm-svn: 367141

5 years ago[TableGen] Move core properties into a separate file (NFC)
Jonas Devlieghere [Fri, 26 Jul 2019 18:14:12 +0000 (18:14 +0000)]
[TableGen] Move core properties into a separate file (NFC)

With the plugins having their own tablgen file, it makes sense to split
off the core properties as well.

llvm-svn: 367140

5 years ago[TableGen] Move target properties into a separate file (NFC)
Jonas Devlieghere [Fri, 26 Jul 2019 18:14:08 +0000 (18:14 +0000)]
[TableGen] Move target properties into a separate file (NFC)

With the plugins having their own tablgen file, it makes sense to split
off the target properties as well.

llvm-svn: 367139

5 years ago[TableGen] Move interpreter properties into a separate file (NFC)
Jonas Devlieghere [Fri, 26 Jul 2019 18:14:04 +0000 (18:14 +0000)]
[TableGen] Move interpreter properties into a separate file (NFC)

With the plugins having their own tablgen file, it makes sense to split
off the interpreter properties as well.

llvm-svn: 367138

5 years ago[clang-format] Fix style of css file paths
Diego Astiazaran [Fri, 26 Jul 2019 18:02:42 +0000 (18:02 +0000)]
[clang-format] Fix style of css file paths

CSS files included in HTML should have a path in posix style, it should
not be different for Windows.

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

llvm-svn: 367137

5 years ago[lld-link] diagnose undefined symbols before LTO when possible
Bob Haarman [Fri, 26 Jul 2019 17:56:45 +0000 (17:56 +0000)]
[lld-link] diagnose undefined symbols before LTO when possible

Summary:
This allows reporting undefined symbols before LTO codegen is
run. Since LTO codegen can take a long time, this improves user
experience by avoiding that time spend if the link is going to
fail with undefined symbols anyway.

Fixes PR32400.

Reviewers: ruiu

Reviewed By: ruiu

Subscribers: mehdi_amini, steven_wu, dexonsmith, mstorsjo, llvm-commits

Tags: #llvm

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

llvm-svn: 367136

5 years ago[Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression
Nathan Huckleberry [Fri, 26 Jul 2019 17:29:35 +0000 (17:29 +0000)]
[Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

Summary:
Do not automatically report self references of structs in statement expression
as warnings. Instead wait for uninitialized cfg analysis.
https://bugs.llvm.org/show_bug.cgi?id=42604

Reviewers: aaron.ballman, rsmith, nickdesaulniers

Reviewed By: aaron.ballman, nickdesaulniers

Subscribers: nathanchance, cfe-commits

Tags: #clang

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

llvm-svn: 367134

5 years ago[PowerPC][AIX]Add lowering of MCSymbol MachineOperand.
Sean Fertile [Fri, 26 Jul 2019 17:25:27 +0000 (17:25 +0000)]
[PowerPC][AIX]Add lowering of MCSymbol MachineOperand.

Adds machine operand lowering for MCSymbolSDNodes to the PowerPC
backend. This is needed to produce call instructions in assembly for AIX
because the callee operand is a MCSymbolSDNode. The test is XFAIL'ed for
asserts due to a (valid) assertion in PEI that the AIX ABI isn't supported yet.

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

llvm-svn: 367133

5 years agoDocument that LLDB_LOG macros use the format_providers.
Jim Ingham [Fri, 26 Jul 2019 17:25:20 +0000 (17:25 +0000)]
Document that LLDB_LOG macros use the format_providers.

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

llvm-svn: 367132

5 years ago[AMDGPU] Fix typo.
Michael Liao [Fri, 26 Jul 2019 17:13:59 +0000 (17:13 +0000)]
[AMDGPU] Fix typo.

llvm-svn: 367131

5 years ago[llvm-objcopy] Add support for --add-section for COFF
Sergey Dmitriev [Fri, 26 Jul 2019 17:06:41 +0000 (17:06 +0000)]
[llvm-objcopy] Add support for --add-section for COFF

This patch enables support for --add-section=... option for COFF objects.

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

llvm-svn: 367130

5 years ago[CMake] Fix find_python_libs_windows
Jonas Devlieghere [Fri, 26 Jul 2019 16:32:49 +0000 (16:32 +0000)]
[CMake] Fix find_python_libs_windows

Exporting PYTHON_INCLUDE_DIR to the Python scope somehow got lost in my
last change. Add it back again. This should fix the Windows bot!

llvm-svn: 367127

5 years ago[ELF] Simplify with dyn_cast_or_null. NFC
Fangrui Song [Fri, 26 Jul 2019 16:29:15 +0000 (16:29 +0000)]
[ELF] Simplify with dyn_cast_or_null. NFC

llvm-svn: 367126

5 years ago[CMake] Print Python version on Windows
Jonas Devlieghere [Fri, 26 Jul 2019 16:15:19 +0000 (16:15 +0000)]
[CMake] Print Python version on Windows

Trying to figure out what's causing the Windows bot to fail.

llvm-svn: 367125

5 years ago[AArch64][SVE2] Rename bitperm feature to sve2-bitperm
Cullen Rhodes [Fri, 26 Jul 2019 15:57:50 +0000 (15:57 +0000)]
[AArch64][SVE2] Rename bitperm feature to sve2-bitperm

Summary:
The bitperm feature flag is now prefixed with SVE2, as it is for all other SVE2
extensions

Patch by Maciej Gabka.

Reviewers: sdesmalen, rovka, chill, SjoerdMeijer, rengolin

Reviewed By: SjoerdMeijer, rengolin

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

llvm-svn: 367124

5 years ago[llvm] [lit/tests] Replace 'env -u' with more portable construct
Michal Gorny [Fri, 26 Jul 2019 15:39:05 +0000 (15:39 +0000)]
[llvm] [lit/tests] Replace 'env -u' with more portable construct

Set environment variables to empty values rather than attempting
to unset them via 'env -u', in order to fix NetBSD test regression
caused by r366980.  POSIX does not guarantee that env(1) supports '-u'
option, and indeed NetBSD env(1) does not support it.

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

llvm-svn: 367123

5 years ago[llvm] [FileCheck] Use FILECHECK_DUMP_INPUT_ON_FAILURE only when non-empty
Michal Gorny [Fri, 26 Jul 2019 15:38:57 +0000 (15:38 +0000)]
[llvm] [FileCheck] Use FILECHECK_DUMP_INPUT_ON_FAILURE only when non-empty

Enable dumping output only if FILECHECK_DUMP_INPUT_ON_FAILURE is set to
a non-empty value.  This is necessary to support disabling it via
POSIX-compliant env(1) that does not support '-u' argument,
and therefore fix regression caused by r366980.

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

llvm-svn: 367122

5 years ago[clangd] Support extraction of binary "subexpressions" like a + [[b + c]].
Sam McCall [Fri, 26 Jul 2019 15:29:52 +0000 (15:29 +0000)]
[clangd] Support extraction of binary "subexpressions" like a + [[b + c]].

Summary:
These aren't formally subexpressions in C++, in this case + is left-associative.
However informally +, *, etc are usually (mathematically) associative and users
consider these subexpressions.

We detect these and in simple cases support extracting the partial expression.
As well as builtin associative operators, we assume that overloads of them
are associative and support those too.

Reviewers: SureYeaah

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 367121

5 years agoFix a bug in std::chrono::abs where it would fail when the duration's period had...
Marshall Clow [Fri, 26 Jul 2019 15:10:46 +0000 (15:10 +0000)]
Fix a bug in std::chrono::abs where it would fail when the duration's period had not been reduced.s

llvm-svn: 367120

5 years ago[ARM] Set default alignment to 64bits
Simi Pallipurath [Fri, 26 Jul 2019 15:05:19 +0000 (15:05 +0000)]
[ARM] Set default alignment to 64bits

The maximum alignment used by ARM arch
is 64bits, not 128.

This could cause overaligned memory
access for 128 bit neon vector that
have unpredictable behaviour.

This fixes: https://bugs.llvm.org/show_bug.cgi?id=42668

Patch by: Diogo Sampaio(diogo.sampaio@arm.com)

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

Change-Id: I5a62b766491f15dd51e4cfe6625929db897f67e3
llvm-svn: 367119

5 years agoRevert r367091, it caused PR42777.
Nico Weber [Fri, 26 Jul 2019 14:58:42 +0000 (14:58 +0000)]
Revert r367091, it caused PR42777.

llvm-svn: 367118

5 years ago[ELF] Detemplate maybeReportUndefined and copySectionsIntoPartitions
Fangrui Song [Fri, 26 Jul 2019 14:57:53 +0000 (14:57 +0000)]
[ELF] Detemplate maybeReportUndefined and copySectionsIntoPartitions

llvm-svn: 367117

5 years ago[OPENMP]Add support for analysis of reduction variables.
Alexey Bataev [Fri, 26 Jul 2019 14:50:05 +0000 (14:50 +0000)]
[OPENMP]Add support for analysis of reduction variables.

Summary:
Reduction variables are the variables, for which the private copies
must be created in the OpenMP regions. Then they are initialized with
the predefined values depending on the reduction operation. After exit
from the OpenMP region the original variable is updated using the
reduction value and the value of the original reduction variable.

Reviewers: NoQ

Subscribers: guansong, jdoerfert, caomhin, kkwli0, cfe-commits

Tags: #clang

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

llvm-svn: 367116

5 years ago[CMake] Loosen Python version check and ignore patch version
Jonas Devlieghere [Fri, 26 Jul 2019 14:26:33 +0000 (14:26 +0000)]
[CMake] Loosen Python version check and ignore patch version

Some versions of macOS report a different patch version for the system
provided interpreter and libraries.

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

llvm-svn: 367115

5 years ago[ARM][ParallelDSP] Combine structs
Sam Parker [Fri, 26 Jul 2019 14:11:40 +0000 (14:11 +0000)]
[ARM][ParallelDSP] Combine structs

Combine OpChain and BinOpChain structs as OpChain is a base class to
BinOpChain that is never used.

llvm-svn: 367114

5 years ago[Clangd] Disable ExtractVariable for all types of assignments
Shaurya Gupta [Fri, 26 Jul 2019 14:08:27 +0000 (14:08 +0000)]
[Clangd] Disable ExtractVariable for all types of assignments

Reviewers: sammccall, kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 367113

5 years ago[clangd] Fix background index not triggering on windows due to case mismatch.
Sam McCall [Fri, 26 Jul 2019 14:07:11 +0000 (14:07 +0000)]
[clangd] Fix background index not triggering on windows due to case mismatch.

Summary:
This isn't a general fix to all paths where we assume case-sensitivity, it's
a minimally-invasive fix targeting the llvm 9 branch.

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 367112

5 years ago[PowerPC] Add getCRSaveOffset to improve readability. [NFC]
Sean Fertile [Fri, 26 Jul 2019 14:02:17 +0000 (14:02 +0000)]
[PowerPC] Add getCRSaveOffset to improve readability. [NFC]

In preperation for AIX support in FrameLowering: replace a number of literal
'8' that represent the stack offset of the condition register save area with
a member in PPCFrameLowering.

Patch by Chris Bowler.

llvm-svn: 367111

5 years ago[lldb][NFC] Remove eDiagnosticOriginGo
Raphael Isemann [Fri, 26 Jul 2019 14:00:13 +0000 (14:00 +0000)]
[lldb][NFC] Remove eDiagnosticOriginGo

This enum value is unused as we removed Go support.

llvm-svn: 367110

5 years agogn build: Merge r367043
Nico Weber [Fri, 26 Jul 2019 13:27:19 +0000 (13:27 +0000)]
gn build: Merge r367043

llvm-svn: 367109

5 years agogn build: Merge r366956
Nico Weber [Fri, 26 Jul 2019 13:24:56 +0000 (13:24 +0000)]
gn build: Merge r366956

llvm-svn: 367108

5 years ago[MIPS GlobalISel] Fix check for void return during lowerCall
Petar Avramovic [Fri, 26 Jul 2019 13:19:37 +0000 (13:19 +0000)]
[MIPS GlobalISel] Fix check for void return during lowerCall

Void return used to have unsigned with value 0 for virtual register
but with addition of Register class and changes to arguments to lowerCall
this is no longer valid.
Check for void return by inspecting the Ty field in OrigRet.

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

llvm-svn: 367107

5 years agoDWARF: Improve type safety or range lists parsing
Pavel Labath [Fri, 26 Jul 2019 13:15:28 +0000 (13:15 +0000)]
DWARF: Improve type safety or range lists parsing

Delete the abstract GetOffset function, which is only defined for
rnglists entries. Instead fix up entries which refer to the range list
classes so that one can statically know that he is dealing with the
rnglists section and call the function that way.

llvm-svn: 367106

5 years ago[AMDGPU] Move WQM/WWM intrinsic instruction selection to AMDGPUISelDAGToDAG
Carl Ritson [Fri, 26 Jul 2019 13:11:44 +0000 (13:11 +0000)]
[AMDGPU] Move WQM/WWM intrinsic instruction selection to AMDGPUISelDAGToDAG

Reviewers: arsenm, nhaehnle

Reviewed By: arsenm

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 367105

5 years ago[MIPS GlobalISel] Select inttoptr and ptrtoint
Petar Avramovic [Fri, 26 Jul 2019 13:08:06 +0000 (13:08 +0000)]
[MIPS GlobalISel] Select inttoptr and ptrtoint

Select G_INTTOPTR and G_PTRTOINT for MIPS32.

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

llvm-svn: 367104

5 years agoMake the CXXABIs respect the target's default calling convention.
Erich Keane [Fri, 26 Jul 2019 12:36:12 +0000 (12:36 +0000)]
Make the CXXABIs respect the target's default calling convention.

SPIR targets need to have all functions be SPIR calling convention,
however the CXXABIs were just returning CC_C in all non-'this-CC' cases.

https://reviews.llvm.org/D65294

llvm-svn: 367103

5 years ago[lldb] Don't dynamically allocate the posix option validator.
Raphael Isemann [Fri, 26 Jul 2019 11:46:21 +0000 (11:46 +0000)]
[lldb] Don't dynamically allocate the posix option validator.

We dynamically allocate the option validator which means we
can't mark this list of OptionDefinitions as constexpr. It's also
more complicated than necessary.

llvm-svn: 367102

5 years ago[InstCombine] remove flop from lerp patterns
Sanjay Patel [Fri, 26 Jul 2019 11:19:18 +0000 (11:19 +0000)]
[InstCombine] remove flop from lerp patterns

(Y * (1.0 - Z)) + (X * Z) -->
Y - (Y * Z) + (X * Z) -->
Y + Z * (X - Y)

This is part of solving:
https://bugs.llvm.org/show_bug.cgi?id=42716

Factoring eliminates an instruction, so that should be a good canonicalization.
The potential conversion to FMA would be handled by the backend based on target
capabilities.

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

llvm-svn: 367101

5 years ago[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDemandedBit...
Simon Pilgrim [Fri, 26 Jul 2019 11:10:20 +0000 (11:10 +0000)]
[X86][SSE] Replace PMULDQ GetDemandedBits combine with SimplifyMultipleUseDemandedBits handler.

This removes a GetDemandedBits user and allows us to benefit from the DemandedElts propagated through SimplifyDemandedBits.

llvm-svn: 367100

5 years ago[NFC][ARM][ParallelDSP] Cleanup isNarrowSequence
Sam Parker [Fri, 26 Jul 2019 10:57:42 +0000 (10:57 +0000)]
[NFC][ARM][ParallelDSP] Cleanup isNarrowSequence

Remove unused logic.

llvm-svn: 367099

5 years ago[SelectionDAG] GetDemandedBits - update SIGN_EXTEND_INREG op to just call SimplifyMul...
Simon Pilgrim [Fri, 26 Jul 2019 10:03:07 +0000 (10:03 +0000)]
[SelectionDAG] GetDemandedBits - update SIGN_EXTEND_INREG op to just call SimplifyMultipleUseDemandedBits.

llvm-svn: 367098

5 years ago[AMDGPU] Add llvm.amdgcn.softwqm intrinsic
Carl Ritson [Fri, 26 Jul 2019 09:54:12 +0000 (09:54 +0000)]
[AMDGPU] Add llvm.amdgcn.softwqm intrinsic

Add llvm.amdgcn.softwqm intrinsic which behaves like llvm.amdgcn.wqm
only if there is other WQM computation in the shader.

Reviewers: nhaehnle, tpr

Reviewed By: nhaehnle

Subscribers: arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, t-tye, llvm-commits

Tags: #llvm

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

llvm-svn: 367097