OSDN Git Service
Petr Hosek [Thu, 16 Nov 2017 21:28:54 +0000 (21:28 +0000)]
[CMake][runtimes] Use cmake_parse_arguments in runtimes functions
Passing lists to functions in CMake is tricky, any list argument
has to be quoted otherwise it'll be expanded. To avoid this issue,
use cmake_parse_arguments in runtime functions and pass lists using
a keyword argument which eliminates any ambiguity when dealing with
lists.
Differential Revision: https://reviews.llvm.org/D40087
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318457
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 16 Nov 2017 21:08:51 +0000 (21:08 +0000)]
Revert "[SelectionDAG] Consolidate (t|T)ransferDbgValues methods, NFC."
This reverts commit r318448. It looks like some of the asserts need to
be weakened.
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/16296
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318455
91177308-0d34-0410-b5e6-
96231b3b80d8
Mandeep Singh Grang [Thu, 16 Nov 2017 20:30:49 +0000 (20:30 +0000)]
[RISCV] Fix 64-bit data layout mismatch between backend and target description
Reviewers: asb
Reviewed By: asb
Subscribers: rbar, johnrusso, simoncook, jordy.potman.lists, llvm-commits
Differential Revision: https://reviews.llvm.org/D40145
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318454
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 16 Nov 2017 20:23:22 +0000 (20:23 +0000)]
[X86] Pre-truncate gather/scatter indices that have element sizes larger than 64-bits before Legalize.
The wider element type will normally cause legalize to try to split and scalarize the gather/scatter, but we can't handle that. Instead, truncate the index early so the gather/scatter node is insulated from the legalization.
This really shouldn't happen in practice since InstCombine will normalize index types to the same size as pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318452
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 16 Nov 2017 20:23:17 +0000 (20:23 +0000)]
[X86] DAGCombinerInfo is in TargetLowering not X86TargetLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318451
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 16 Nov 2017 20:23:12 +0000 (20:23 +0000)]
[DAGCombiner] Use cast instead of an unchecked dyn_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318450
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 16 Nov 2017 20:20:56 +0000 (20:20 +0000)]
llvm-objdump: Add missing requires for the test in r313921
This test needs an arm backend in addition to the arm64 one that's
already checked in the test directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318449
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 16 Nov 2017 19:50:24 +0000 (19:50 +0000)]
[SelectionDAG] Consolidate (t|T)ransferDbgValues methods, NFC.
TransferDbgValues (capital 'T') is wired into ReplaceAllUsesWith, and
transferDbgValues (lowercase 't') is used elsewhere (e.g in Legalize).
Both functions should be doing the exact same thing. This patch
consolidates the logic into one place.
Differential Revision: https://reviews.llvm.org/D40104
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318448
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 16 Nov 2017 19:41:12 +0000 (19:41 +0000)]
Fix my typo of PDB_TableType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318447
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 16 Nov 2017 19:32:53 +0000 (19:32 +0000)]
Fix -Wreturn-type falling off the end of a function in new DIA code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318444
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 16 Nov 2017 19:16:56 +0000 (19:16 +0000)]
[arc] Fix ambiguous overloaded operator error
lib/Target/ARC/ARCISelLowering.cpp:490:22: error: use of overloaded operator '<<' is ambiguous (with operand types 'llvm::raw_ostream' and 'llvm::MVT::SimpleValueType')
<< RegVT.getSimpleVT().SimpleTy << "\n");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318443
91177308-0d34-0410-b5e6-
96231b3b80d8
Yonghong Song [Thu, 16 Nov 2017 19:15:36 +0000 (19:15 +0000)]
bpf: print backward branch target properly
Currently, it prints the backward branch offset as unsigned value
like below:
7: 7d 34 0b 00 00 00 00 00 if r4 s>= r3 goto 11 <LBB0_3>
8: b7 00 00 00 00 00 00 00 r0 = 0
LBB0_2:
9: 07 00 00 00 01 00 00 00 r0 += 1
......
17: bf 31 00 00 00 00 00 00 r1 = r3
18: 6d 32 f6 ff 00 00 00 00 if r2 s> r3 goto 65526 <LBB0_3+0x7FFB0>
The correct print insn 18 should be:
18: 6d 32 f6 ff 00 00 00 00 if r2 s> r3 goto -10 <LBB0_2>
To provide better clarity and be consistent with kernel verifier output,
the insn 7 output is changed to the following with "+" added to
non-negative branch offset:
7: 7d 34 0b 00 00 00 00 00 if r4 s>= r3 goto +11 <LBB0_3>
Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318442
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 16 Nov 2017 19:10:26 +0000 (19:10 +0000)]
[arc] Update TargetInfo to include the new backend name argument
Also update a comment about the usage of RegisterTarget() that didn't mention
the new argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318441
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 16 Nov 2017 18:58:14 +0000 (18:58 +0000)]
[libFuzzer] add docs for -reduce_inputs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318439
91177308-0d34-0410-b5e6-
96231b3b80d8
Azharuddin Mohammed [Thu, 16 Nov 2017 18:39:31 +0000 (18:39 +0000)]
Fix RISCV build after r318352
Reviewers: asb, apazos, mgrang
Reviewed By: mgrang
Subscribers: rbar, johnrusso, simoncook, jordy.potman.lists, llvm-commits
Differential Revision: https://reviews.llvm.org/D40139
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318437
91177308-0d34-0410-b5e6-
96231b3b80d8
Guozhi Wei [Thu, 16 Nov 2017 18:27:34 +0000 (18:27 +0000)]
[PPC] Change i32 constant in store instruction to i64
This patch changes all i32 constant in store instruction to i64 with truncation, to increase the chance that the referenced constant can be shared with other i64 constant.
Differential Revision: https://reviews.llvm.org/D39352
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318436
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 16 Nov 2017 18:26:20 +0000 (18:26 +0000)]
Resubmit "Refactor debuginfo-tests"
This was reverted due to some failures on specific darwin buildbots,
the issue being that the new lit configuration was not setting the
SDKROOT environment variable. We've tested a fix locally and confirmed
that it works, so this patch resubmits everything with the fix
applied.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318435
91177308-0d34-0410-b5e6-
96231b3b80d8
Dave Lee [Thu, 16 Nov 2017 18:10:15 +0000 (18:10 +0000)]
Add ELF dynamic symbol support to yaml2obj/obj2yaml
Summary:
This change introduces a `DynamicSymbols` field to the ELF specific YAML
supported by `yaml2obj` and `obj2yaml`. This grouping of symbols provides a way
to represent ELF dynamic symbols. The `DynamicSymbols` structure is identical to
the existing `Symbols`.
Reviewers: compnerd, jakehehrlich, silvas
Reviewed By: silvas
Subscribers: silvas, jakehehrlich, llvm-commits
Differential Revision: https://reviews.llvm.org/D39582
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318433
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 16 Nov 2017 17:49:54 +0000 (17:49 +0000)]
[InstCombine] add tests for pow(); NFC
Also, increase test diversity (and show another bug) by varying the types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318430
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 16 Nov 2017 17:46:43 +0000 (17:46 +0000)]
make exitDsymutil static.
The objective is to remove it completelly.
This first patch removes the last use outside dsymutil.cpp and makes
it static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318429
91177308-0d34-0410-b5e6-
96231b3b80d8
Dave Lee [Thu, 16 Nov 2017 17:46:11 +0000 (17:46 +0000)]
Allow empty mappings for optional YAML input
Summary:
This change fixes a bug where `obj2yaml` can in some cases produce YAML that
causes `yaml2obj` to error.
The ELF YAML document structure has a `Sections` mapping, which contains three
mappings, all of which are optional: `Local`, `Global`, and `Weak.` Any one of
these can be missing, but if all three are missing, then `yaml2obj` errors. This
change allows YAML input for cases like this one.
I have tested this with check-llvm and check-lld, and all tests passed.
This change is the result of test failures while working on D39582, which
introduces a `DynamicSymbols` mapping, which will be empty at times.
Reviewers: compnerd, jakehehrlich, silvas, kledzik, mehdi_amini, pcc
Reviewed By: compnerd
Subscribers: silvas, llvm-commits
Differential Revision: https://reviews.llvm.org/D39908
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318428
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 16 Nov 2017 17:35:50 +0000 (17:35 +0000)]
Convert another use of createUniqueFile to TempFile::create.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318427
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Smith [Thu, 16 Nov 2017 17:24:49 +0000 (17:24 +0000)]
[DebugInfo/PDB] Exclude the PDB/DIA files added in my previous commit from modulemap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318425
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 16 Nov 2017 17:06:36 +0000 (17:06 +0000)]
[InstCombine] add tests for 'afn' FMF; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318423
91177308-0d34-0410-b5e6-
96231b3b80d8
Walter Lee [Thu, 16 Nov 2017 17:03:00 +0000 (17:03 +0000)]
[asan] Fix small X86_64 ShadowOffset for non-default shadow scale
The requirement is that shadow memory must be aligned to page
boundaries (4k in this case). Use a closed form equation that always
satisfies this requirement.
Differential Revision: https://reviews.llvm.org/D39471
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318421
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 16 Nov 2017 17:01:09 +0000 (17:01 +0000)]
[InstCombine] regenerate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318420
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 16 Nov 2017 17:00:48 +0000 (17:00 +0000)]
Revert "[Support][CachePruning] Fix regression in pruning interval"
This reverts commit r318397.
It broke tools/gold/X86/cache.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318419
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 16 Nov 2017 16:59:49 +0000 (16:59 +0000)]
[InstCombine] regenerate test checks; NFC
Also, remove some unnecessary bits. I don't think we need fcmp in any test here either?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318418
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 16 Nov 2017 16:38:42 +0000 (16:38 +0000)]
[InstCombine] regenerate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318417
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 16 Nov 2017 16:36:48 +0000 (16:36 +0000)]
[InstCombine] regenerate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318416
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Thu, 16 Nov 2017 16:32:16 +0000 (16:32 +0000)]
Let llvm.invariant.group.barrier accepts pointer to any address space
llvm.invariant.group.barrier may accept pointers to arbitrary address space.
This patch let it accept pointers to i8 in any address space and returns
pointer to i8 in the same address space.
Differential Revision: https://reviews.llvm.org/D39973
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318413
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Thu, 16 Nov 2017 16:17:32 +0000 (16:17 +0000)]
[FuzzMutate] Fix windows build after rL318407.
Add correct library dependence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318409
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 16 Nov 2017 15:25:59 +0000 (15:25 +0000)]
[InstSimplify] add tests for fcmp ord/uno; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318408
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Thu, 16 Nov 2017 15:23:08 +0000 (15:23 +0000)]
[FuzzMutate] NFC. Move parseModule and writeModule from llvm-isel-fuzzer into FuzzMutate.
This is to be able to reuse them in the llvm-opt-fuzzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318407
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Thu, 16 Nov 2017 15:15:00 +0000 (15:15 +0000)]
Remove stray comma in sink-addrmode test
The extra comma meant it wasn't correctly checking that we weren't getting an
extra getelementptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318406
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 16 Nov 2017 14:40:51 +0000 (14:40 +0000)]
[InstCombine] include 'sub' in the list of narrow-able binops
// trunc (binop X, C) --> binop (trunc X, C')
// trunc (binop (ext X), Y) --> binop X, (trunc Y)
I'm grouping sub with the other binops because that makes the code simpler
and the transforms are valid:
https://rise4fun.com/Alive/UeF
...so even though we don't expect a sub with constant Op1 or any of the
other opcodes with constant Op0 due to canonicalization rules, we might as
well handle those situations if non-canonical code somehow reaches this
point (it should just make instcombine more efficient in reaching its
end goal).
This should solve the problem that later manifests in the vectorizers in
PR35295:
https://bugs.llvm.org/show_bug.cgi?id=35295
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318404
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Smith [Thu, 16 Nov 2017 14:33:09 +0000 (14:33 +0000)]
[DebugInfo/PDB] Adding getUndecoratedNameEx and IPDB interfaces for IDiaEnumTables and IDiaTable.
Initial changes to support debugging PE/COFF files with LLDB on Windows through DIA SDK.
There is another set of changes required on the LLDB side before this does anything.
Differential Revision: https://reviews.llvm.org/D39517
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318403
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 16 Nov 2017 14:13:48 +0000 (14:13 +0000)]
[X86] Add scheduling tests for SHLD/SHRD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318402
91177308-0d34-0410-b5e6-
96231b3b80d8
Javed Absar [Thu, 16 Nov 2017 13:49:27 +0000 (13:49 +0000)]
[SCEV] simplify loop. NFC.
Change loop to range-based
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318401
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Smith [Thu, 16 Nov 2017 13:42:28 +0000 (13:42 +0000)]
Test commit. Add a missing dash to the standard llvm file header; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318400
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 16 Nov 2017 13:32:47 +0000 (13:32 +0000)]
[ARM GlobalISel] Add tests for BIC. NFC
Add instruction selector tests for BICrr and BICri, which are handled by
TableGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318398
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Dunbobbin [Thu, 16 Nov 2017 13:15:56 +0000 (13:15 +0000)]
[Support][CachePruning] Fix regression in pruning interval
Fixed broken comparison.
borked by: rL284966 (see: https://reviews.llvm.org/D25730).
Differential Revision: https://reviews.llvm.org/D40119
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318397
91177308-0d34-0410-b5e6-
96231b3b80d8
Walter Lee [Thu, 16 Nov 2017 12:57:19 +0000 (12:57 +0000)]
[asan] Fix size/alignment issues with non-default shadow scale
Fix a couple places where the minimum alignment/size should be a
function of the shadow granularity:
- alignment of AllGlobals
- the minimum left redzone size on the stack
Added a test to verify that the metadata_array is properly aligned
for shadow scale of 5, to be enabled when we add build support
for testing shadow scale of 5.
Differential Revision: https://reviews.llvm.org/D39470
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318395
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 16 Nov 2017 12:29:28 +0000 (12:29 +0000)]
[ARM GlobalISel] Add tests for REVSH patterns. NFC
Add instruction selector tests for some of the REVSH patterns handled by
TableGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318393
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Thu, 16 Nov 2017 12:22:19 +0000 (12:22 +0000)]
Fix pointer EVT in SelectionDAGBuilder::visitAlloca
SelectionDAGBuilder::visitAlloca assumes alloca address space is 0, which is
incorrect for triple amdgcn---amdgiz and causes isel failure.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D40095
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318392
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Thu, 16 Nov 2017 11:28:26 +0000 (11:28 +0000)]
[DAGCombine] Enable more srl -> load combines
Change the calculation for the desired ValueType for non-sign
extending loads, as in those cases we don't care about the
higher bits. This creates a smaller ExtVT and allows for such
combinations as:
(srl (zextload i16, [addr]), 8) -> (zextload i8, [addr + 1])
Differential Revision: https://reviews.llvm.org/D40034
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318390
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Thu, 16 Nov 2017 10:50:44 +0000 (10:50 +0000)]
[mips][mt] Add missing test cases from r318207
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318389
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 16 Nov 2017 10:18:07 +0000 (10:18 +0000)]
Assert correct removal of SUnit in LatencyPriorityQueue
The LatencyPriorityQueue doesn't currently check whether the SU being removed really exists in the Queue.
This method fails quietly when SU is not found and removes the last element from the Queue, leading to unexpected behavior.
Unfortunately, this only occurs on our custom target, with the custom scheduler. In our case, when remove() is invoked, it removes the wrong SU at the end of the Queue, which is only discovered later when VerifyScheduledDAG() is invoked and finds that some nodes were not scheduled at all.
As this is only reproducible with a lot of proprietary code, I'm hopeful this assert is straightforward enough to not necessitate a test.
Patch by Ondrej Glasnak!
Differential Revision: https://reviews.llvm.org/D40084
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318387
91177308-0d34-0410-b5e6-
96231b3b80d8
Mohammed Agabaria [Thu, 16 Nov 2017 09:38:32 +0000 (09:38 +0000)]
[TTI][X86] update costs of interleaved load\store of i64\double
This patch contains more accurate cost of interelaved load\store of stride 2 for the types int64\double on AVX2.
Reviewers: delena, RKSimon, craig.topper, dorit
Reviewed By: dorit
Differential Revision: https://reviews.llvm.org/D40008
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318385
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikael Holmen [Thu, 16 Nov 2017 07:01:23 +0000 (07:01 +0000)]
[MachineRegisterInfo] Avoid having dbg.values affect code generation
Summary:
Use use_nodbg_empty() rather than use_empty() in
MachineRegisterInfo::EmitLiveInCopies() when determining if a livein
register has any uses or not. Otherwise a single dbg.value can make us
generate different code, meaning -g would affect code generation.
Found when compiling code for my out-of-tree target. Unfortunately I
haven't been able to reproduce the problem on X86 or any of the other
in-tree targets that I tried, so no test case.
Reviewers: MatzeB
Reviewed By: MatzeB
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39044
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318382
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Thu, 16 Nov 2017 06:06:27 +0000 (06:06 +0000)]
[IRCE] Fix SCEVExpander's usage in IRCE
When expanding exit conditions for pre- and postloops, we may end up expanding a
recurrency from the loop to in its loop's preheader. This produces incorrect IR.
This patch ensures that IRCE uses SCEVExpander correctly and only expands code which
is safe to expand in this particular location.
Differentian Revision: https://reviews.llvm.org/D39234
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318381
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 16 Nov 2017 06:02:05 +0000 (06:02 +0000)]
[X86] Update TTI to report that v1iX/v1fX types aren't legal for masked gather/scatter/load/store.
The type legalizer will try to scalarize these operations if it sees them, but there is no handling for scalarizing them. This leads to a fatal error. With this change they will now be scalarized by the mem intrinsic scalarizing pass before SelectionDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318380
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 16 Nov 2017 06:02:03 +0000 (06:02 +0000)]
[SelectionDAG] Use report_fatal_error instead of llvm_unreachable in some code that can be reached if targets don't configure things correctly.
For example, this is currently reachable by X86 if you use a masked store intrinsic with a v1iX type.
Using a fatal error seems like a better user experience if someone were to encounter this on a release build. There are several other similar places that have been converted from unreachable to fatal error previously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318379
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Thu, 16 Nov 2017 05:10:56 +0000 (05:10 +0000)]
[SCEV][NFC] Introduce isSafeToExpandAt function to SCEVExpander
This function checks that:
1) It is safe to expand a SCEV;
2) It is OK to materialize it at the specified location.
For example, attempt to expand a loop's AddRec to the same loop's preheader should fail.
Differential Revision: https://reviews.llvm.org/D39236
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318377
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 16 Nov 2017 03:25:02 +0000 (03:25 +0000)]
Fix thinko in last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318374
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 16 Nov 2017 03:18:15 +0000 (03:18 +0000)]
Add NDEBUG checks around LLVM_DUMP_METHOD functions for Wunused-function warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318373
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 16 Nov 2017 03:18:13 +0000 (03:18 +0000)]
Need to work around the gcc Wunused-function bug as far back as gcc 6.1, update accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318372
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Thu, 16 Nov 2017 02:54:49 +0000 (02:54 +0000)]
Fix APInt bit size in processDbgDeclares
processDbgDeclares assumes pointer size is the same for different addr spaces.
It uses pointer size for addr space 0 for all pointers, which causes assertion
in stripAndAccumulateInBoundsConstantOffsets for amdgcn---amdgiz since
pointer in addr space 5 has different size than in addr space 0.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D40085
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318370
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 16 Nov 2017 02:52:19 +0000 (02:52 +0000)]
[asan] Fallback to non-ifunc dynamic shadow on android<22.
Summary: Android < 22 does not support ifunc.
Reviewers: pcc
Subscribers: srhines, kubamracek, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D40116
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318369
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 16 Nov 2017 02:07:45 +0000 (02:07 +0000)]
[X86] Custom type legalize v2f32 masked gathers instead of trying to cleanup after type legalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318368
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Haarman [Thu, 16 Nov 2017 01:16:52 +0000 (01:16 +0000)]
LTO: clarify why we need to gracefully handle sys::fs::rename failures
Reviewers: pcc, rafael
Reviewed By: pcc
Subscribers: mehdi_amini, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D40094
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318362
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 16 Nov 2017 01:06:36 +0000 (01:06 +0000)]
Convert a use of createUniqueFile to TempFile::create.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318361
91177308-0d34-0410-b5e6-
96231b3b80d8
Yonghong Song [Thu, 16 Nov 2017 00:52:30 +0000 (00:52 +0000)]
bpf: enable llvm-objdump to print out symbolized jmp target
Add hook in BPF backend so that llvm-objdump can print out
the jmp target with label names, e.g.,
...
if r1 != 2 goto 6 <LBB0_2>
...
goto 7 <LBB0_4>
...
LBB0_2:
...
LBB0_4:
...
Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318358
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 16 Nov 2017 00:46:35 +0000 (00:46 +0000)]
[globalisel][tablegen] Generate rule coverage and use it to identify untested rules
Summary:
This patch adds a LLVM_ENABLE_GISEL_COV which, like LLVM_ENABLE_DAGISEL_COV,
causes TableGen to instrument the generated table to collect rule coverage
information. However, LLVM_ENABLE_GISEL_COV goes a bit further than
LLVM_ENABLE_DAGISEL_COV. The information is written to files
(${CMAKE_BINARY_DIR}/gisel-coverage-* by default). These files can then be
concatenated into ${LLVM_GISEL_COV_PREFIX}-all after which TableGen will
read this information and use it to emit warnings about untested rules.
This technique could also be used by SelectionDAG and can be further
extended to detect hot rules and give them priority over colder rules.
Usage:
* Enable LLVM_ENABLE_GISEL_COV in CMake
* Build the compiler and run some tests
* cat gisel-coverage-[0-9]* > gisel-coverage-all
* Delete lib/Target/*/*GenGlobalISel.inc*
* Build the compiler
Known issues:
* ${LLVM_GISEL_COV_PREFIX}-all must be generated as a manual
step due to a lack of a portable 'cat' command. It should be the
concatenation of all ${LLVM_GISEL_COV_PREFIX}-[0-9]* files.
* There's no mechanism to discard coverage information when the ruleset
changes
Depends on D39742
Reviewers: ab, qcolombet, t.p.northover, aditya_nandakumar, rovka
Reviewed By: rovka
Subscribers: vsk, arsenm, nhaehnle, mgorny, kristof.beyls, javed.absar, igorb, llvm-commits
Differential Revision: https://reviews.llvm.org/D39747
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318356
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 16 Nov 2017 00:32:19 +0000 (00:32 +0000)]
Try to fix WebAssembly build after r318352
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318355
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 16 Nov 2017 00:19:59 +0000 (00:19 +0000)]
[GVNHoist] Fix a signed/unsigned comparison warning that occurs in 32-bit builds with gcc.
std::distance returns ptrdiff_t which is signed. 64-bit builds don't notice because type promotion widens the unsigned first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318354
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Thu, 16 Nov 2017 00:14:05 +0000 (00:14 +0000)]
[CodeGen] Fix the branch probability assertion in r318202
Due to integer precision, we might have numerator greater than denominator in
the branch probability scaling. Add a check to prevent this from happening.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318353
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 15 Nov 2017 23:55:44 +0000 (23:55 +0000)]
Add backend name to Target to enable runtime info to be fed back into TableGen
Summary:
Make it possible to feed runtime information back to tablegen to enable
profile-guided tablegen-eration, detection of untested tablegen definitions, etc.
Being a cross-compiler by nature, LLVM will potentially collect data for multiple
architectures (e.g. when running 'ninja check'). We therefore need a way for
TableGen to figure out what data applies to the backend it is generating at the
time. This patch achieves that by including the name of the 'def X : Target ...'
for the backend in the TargetRegistry.
Reviewers: qcolombet
Reviewed By: qcolombet
Subscribers: jholewinski, arsenm, jyknight, aditya_nandakumar, sdardis, nemanjai, ab, nhaehnle, t.p.northover, javed.absar, qcolombet, llvm-commits, fedor.sergeev
Differential Revision: https://reviews.llvm.org/D39742
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318352
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 15 Nov 2017 23:49:58 +0000 (23:49 +0000)]
[AArch64] Adjust the cost model for Exynos M1 and M2
Fix the modeling of FP stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318351
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Wed, 15 Nov 2017 23:45:04 +0000 (23:45 +0000)]
[GISel][NFC]: Move getOpcodeDef from the LegalizationArtifactCombiner into GlobalISel/Utils for use elsewhere
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318350
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Nov 2017 22:19:55 +0000 (22:19 +0000)]
[InstCombine] add sub narrowing tests; NFC
This might be the root cause of PR35295:
https://bugs.llvm.org/show_bug.cgi?id=35295
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318342
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 15 Nov 2017 21:51:43 +0000 (21:51 +0000)]
AMDGPU: Replace i64 add/sub lowering
Use VOP3 add/addc like usual.
This has some tradeoffs. Inline immediates fold
a little better, but other constants are worse off.
SIShrinkInstructions could be made smarter to handle
these cases.
This allows us to avoid selecting scalar adds where we
need to track the carry in scc and replace its users.
This makes it easier to use the carryless VALU adds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318340
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 15 Nov 2017 21:38:33 +0000 (21:38 +0000)]
[WebAssembly] Update cfg-stackify.ll to remove the workaround added in r318288.
Remove -switch-peel-threshold=100 and update the expected results in test10
in cfg-stackify.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318338
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 15 Nov 2017 21:06:22 +0000 (21:06 +0000)]
[AArch64] Refactor the loads and stores optimizer
Move remaining inline matching of instructions of some optimizations into
separate functions, like in the other optimizations. Otherwise, NFC.
Differential revision: https://reviews.llvm.org/D40090
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318335
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 15 Nov 2017 20:55:53 +0000 (20:55 +0000)]
Simplify file handling in dsymutil.
This moves the file handling out of DwarfLinker.cpp.
This fixes what is at least an oddity if not a bug. DwarfLinker.cpp
was using ToolOutputFile, which uses RemoveFileOnSignal. The issue is
that dsymutil.cpp uses that too. It is now clear from the interface
that only dsymutil.cpp is responsible for creating and deleting files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318334
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 15 Nov 2017 20:42:49 +0000 (20:42 +0000)]
[X86] Add some explanatory comments to the ProcessorFeatures enum in Host.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318331
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 15 Nov 2017 20:42:47 +0000 (20:42 +0000)]
[X86] Add a return to the end of a switch to prevent an accidental fallthrough in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318330
91177308-0d34-0410-b5e6-
96231b3b80d8
Jake Ehrlich [Wed, 15 Nov 2017 19:13:31 +0000 (19:13 +0000)]
[llvm-objcopy] Change -O binary to respect section removal and behave like GNU objcopy
The original -O binary implementation just copied segment data from the
object and dumped it into a file. This doesn't take into account any
operations performed on objects such as section removal. GNU objcopy has
some specific behavior that we'd also like to respect. For instance
using -O binary and -j <some_section> will dump <some_section> to a
file. This change implements GNU objcopy style -O binary to as close of
an approximation as I can determine.
Differential Revision: https://reviews.llvm.org/D39713
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318324
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Nov 2017 19:12:01 +0000 (19:12 +0000)]
[InstCombine] trunc (binop X, C) --> binop (trunc X, C')
Note that one-use and shouldChangeType() are checked ahead of the switch.
Without the narrowing folds, we can produce inferior vector code as shown in PR35299:
https://bugs.llvm.org/show_bug.cgi?id=35299
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318323
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 15 Nov 2017 19:09:22 +0000 (19:09 +0000)]
Use TempFile in lto caching.
This requires a small change to TempFile: allowing a discard after a
failed keep.
With this the cache now handles signals and reuses a fd instead of
reopening the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318322
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Fertile [Wed, 15 Nov 2017 18:58:27 +0000 (18:58 +0000)]
[PowerPC] Implement mayBeEmittedAsTailCall for PPC
Implements TargetLowering callback 'mayBeEmittedAsTailCall' that enables
CodeGenPrepare to duplicate returns when they might enable a tail-call.
Differential Revision: https://reviews.llvm.org/D39777
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318321
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 15 Nov 2017 18:51:12 +0000 (18:51 +0000)]
[InstCombine] Salvage debug info during initial DCE
InstCombine salvages debug info for every instruction it erases from its
worklist, but it wasn't doing it during its initial DCE when populating
its worklist. This fixes that.
This should help improve availability of 'this' in optimized debug info
when casts are necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318320
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Nov 2017 18:09:43 +0000 (18:09 +0000)]
[InstCombine] add tests for missing trunc folds; NFC
As noted in PR35299:
https://bugs.llvm.org/show_bug.cgi?id=35299
...this is likely the root cause for a mis-vectorization transform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318319
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Wed, 15 Nov 2017 18:05:19 +0000 (18:05 +0000)]
[docs] Mention opt -metarenamer in the bugpoint docs
Thanks to arsenm and davide for the suggestion!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318318
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 15 Nov 2017 17:39:37 +0000 (17:39 +0000)]
[AArch64] Adjust the cost model for Exynos M1 and M2
Fix the modeling of loads and stores using the pre or post indexed
addressing modes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318312
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 15 Nov 2017 17:11:24 +0000 (17:11 +0000)]
[X86] Add CBW/CDQ/CDQE/CQO/CWD/CWDE to WriteALU schedule class
Some CPUs are already overriding these sign extension instructions but we should be able to use the WriteALU schedule class by default.
Differential Revision: https://reviews.llvm.org/D39899
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318308
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 15 Nov 2017 17:04:53 +0000 (17:04 +0000)]
[SLP] Added more missed optimization remarks
Summary:
Added more remarks to SLP pass, in particular "missed" optimization remarks.
Also proposed several tests for new functionality.
Patch by Vladimir Miloserdov!
For reference you may look at: https://reviews.llvm.org/rL302811
Reviewers: anemet, fhahn
Reviewed By: anemet
Subscribers: javed.absar, lattner, petecoup, yakush, llvm-commits
Differential Revision: https://reviews.llvm.org/D38367
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318307
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Fertile [Wed, 15 Nov 2017 16:53:41 +0000 (16:53 +0000)]
[PowerPC] Split out the tailcall calling convention checks. NFC.
Move the calling convention checks for tail-call eligibility for the 64-bit
SysV ABI into a separate function. This is so that it can be shared with
'mayBeEmittedAsTailCall' in a subsequent change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318305
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Nov 2017 16:37:30 +0000 (16:37 +0000)]
[PassManager, SimplifyCFG] add test for PR34603 / D38566; NFC
This is a recommit of r316908 which was reverted by r317444.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318300
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Nov 2017 16:33:11 +0000 (16:33 +0000)]
[(new) Pass Manager] instantiate SimplifyCFG with the same options as the old PM
This is a recommit of r316869 which was speculatively reverted with r317444 and
subsequently shown to not be the cause of PR35210. That crash should be fixed
after r318237.
Original commit message:
The old PM sets the options of what used to be known as "latesimplifycfg" on the
instantiation after the vectorizers have run, so that's what we'redoing here.
FWIW, there's a later SimplifyCFGPass instantiation in both PMs where we do not
set the "late" options. I'm not sure if that's intentional or not.
Differential Revision: https://reviews.llvm.org/D39407
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318299
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 15 Nov 2017 16:19:17 +0000 (16:19 +0000)]
[Reassociate] simplify code; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318298
91177308-0d34-0410-b5e6-
96231b3b80d8
Sander de Smalen [Wed, 15 Nov 2017 15:44:43 +0000 (15:44 +0000)]
[AArch64][SVE] Asm: Report SVE parsing diagnostics only once
Summary:
Prevent an issue where a diagnostic is reported multiple times by bailing out with a ParseFail if an invalid SVE register element qualifier/suffix is specified, for example:
<stdin>:10:18: error: invalid sve vector kind qualifier
add z20.h, z2.h, z31.x
^
<stdin>:10:18: error: invalid sve vector kind qualifier
add z20.h, z2.h, z31.x
...
<stdin>:10:18: error: invalid sve vector kind qualifier
add z20.h, z2.h, z31.x
^
Reviewers: fhahn, rengolin
Reviewed By: rengolin
Subscribers: aemerson, javed.absar, tschuett, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D39894
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318297
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Jovanovic [Wed, 15 Nov 2017 15:24:04 +0000 (15:24 +0000)]
[mips] Improve genConstMult() to work with arbitrary precision
APInt is now used instead of uint64_t in function genConstMult() allowing
multiplication optimizations with constants of arbitrary length.
Patch by Milos Stojanovic.
Differential Revision: https://reviews.llvm.org/D38130
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318296
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Wed, 15 Nov 2017 15:07:37 +0000 (15:07 +0000)]
[llvm-opt-fuzzer] Add opt fuzzer to the test-depends list.
This should help with the buildbot failures after rL318293.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318295
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Wed, 15 Nov 2017 13:35:42 +0000 (13:35 +0000)]
[llvm-opt-fuzzer] Only run tests for the x86 target.
This fixes build bot failures after rL318293.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318294
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Wed, 15 Nov 2017 12:36:57 +0000 (12:36 +0000)]
[llvm-opt-fuzzer] NFC. Add sanity tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318293
91177308-0d34-0410-b5e6-
96231b3b80d8
Momchil Velikov [Wed, 15 Nov 2017 12:02:55 +0000 (12:02 +0000)]
[ARM] Split Arm jump table branch into i12 and rs suffixed versions
This is a refactoring/cleanup of Arm `addrmode2` operand class. The patch
removes it completely.
Differential Revision: https://reviews.llvm.org/D39832
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318291
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Wed, 15 Nov 2017 10:57:05 +0000 (10:57 +0000)]
[DebugInfo] Fix potential CU mismatch for SubprogramScopeDIEs.
In constructAbstractSubprogramScopeDIE there can be a potential mismatch
between `this` and the CU of ContextDIE when a scope is shared between
two DISubprograms belonging to a different CU. In that case, `this` is
the CU that was specified in the IR, but the CU of ContextDIE is that of
the first subprogram that was emitted. This patch fixes the mismatch by
looking up the CU of ContextDIE, and switching to use that.
This fixes PR35212 (https://bugs.llvm.org/show_bug.cgi?id=35212)
Patch by Philip Craig!
Differential revision: https://reviews.llvm.org/D39981
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318289
91177308-0d34-0410-b5e6-
96231b3b80d8
Ilya Biryukov [Wed, 15 Nov 2017 10:50:43 +0000 (10:50 +0000)]
Workaround CodeGen/WebAssembly/cfg-stackify.ll failure after r318202
By disabling the introduced optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318288
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikael Holmen [Wed, 15 Nov 2017 07:46:48 +0000 (07:46 +0000)]
[Lint] Don't warn about passing alloca'd value to tail call if using byval
Summary:
This fixes PR35241.
When using byval, the data is effectively copied as part of the call
anyway, so the pointer returned by the alloca will not be leaked to the
callee and thus there is no reason to issue a warning.
Reviewers: rnk
Reviewed By: rnk
Subscribers: Ka-Ka, llvm-commits
Differential Revision: https://reviews.llvm.org/D40009
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318279
91177308-0d34-0410-b5e6-
96231b3b80d8