OSDN Git Service
Reid Kleckner [Wed, 14 Feb 2018 00:24:29 +0000 (00:24 +0000)]
[X86] Remove dead code from retpoline thunk generation
Follow-up to r325049
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325085
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Wed, 14 Feb 2018 00:00:43 +0000 (00:00 +0000)]
[gold] Fix error report in thinlto_emit_linked_objects.ll test
Summary:
It's just cleanup after r323818 to avoid irrelevant error message inside the test.
Existing version of test passed but generated unrelated error report about
symbol redefinition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325080
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam McCall [Tue, 13 Feb 2018 23:23:59 +0000 (23:23 +0000)]
Fix off-by-one in set_thread_name which causes truncation to fail on Linux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325069
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 13 Feb 2018 23:02:44 +0000 (23:02 +0000)]
[globalisel][legalizerinfo] Follow up on post-commit review comments after r323681
* Document most API's
* Delete a useless function call
* Fix a discrepancy between the single and multi-opcode variants of
getActionDefinitions().
The multi-opcode variant now requires that more than one opcode is requested.
Previously it acted much like the single-opcode form but unnecessarily
enforced the requirements of the multi-opcode form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325067
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 13 Feb 2018 23:02:12 +0000 (23:02 +0000)]
[InstCombine] put tests of mul with neg operand(s) together; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325066
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 13 Feb 2018 22:27:17 +0000 (22:27 +0000)]
[GVN] Salvage debug info from dead insts
This preserves an additional 581 unique source variables in a stage2
build of clang (according to `llvm-dwarfdump --statistics`). It
increases the size of the .debug_loc section by 0.1% (or 87139 bytes).
Differential Revision: https://reviews.llvm.org/D43255
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325063
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 13 Feb 2018 22:24:37 +0000 (22:24 +0000)]
[InstCombine] (lshr X, 31) * Y --> (ashr X, 31) & Y
This replaces the bit-tracking based fold that did the same thing,
but it only worked for scalars and not directly.
There is no evidence in existing regression tests that the greater
power of bit-tracking was needed here, but we should be aware of
this potential loss of optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325062
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 13 Feb 2018 21:19:42 +0000 (21:19 +0000)]
[InstCombine] add vector tests, fix comments; NFC
The scalar folds are done indirectly and use potentially
expensive value tracking calls. That can be improved
along with the enhancement to support vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325051
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 13 Feb 2018 20:47:49 +0000 (20:47 +0000)]
[X86] Use EDI for retpoline when no scratch regs are left
Summary:
Instead of solving the hard problem of how to pass the callee to the indirect
jump thunk without a register, just use a CSR. At a call boundary, there's
nothing stopping us from using a CSR to hold the callee as long as we save and
restore it in the prologue.
Also, add tests for this mregparm=3 case. I wrote execution tests for
__llvm_retpoline_push, but they never got committed as lit tests, either
because I never rewrote them or because they got lost in merge conflicts.
Reviewers: chandlerc, dwmw2
Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D43214
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325049
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 13 Feb 2018 20:41:22 +0000 (20:41 +0000)]
[InstCombine] (bool X) * Y --> X ? Y : 0
This is both a functional improvement for vectors and an
efficiency improvement for scalars. The existing code below
the new folds does the same thing for scalars, but in an
indirect and expensive way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325048
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 13 Feb 2018 20:32:53 +0000 (20:32 +0000)]
[LLD] Implement /guard:[no]longjmp
Summary:
This protects calls to longjmp from transferring control to arbitrary
program points. Instead, longjmp calls are limited to the set of
registered setjmp return addresses.
This also implements /guard:nolongjmp to allow users to link in object
files that call setjmp that weren't compiled with /guard:cf. In this
case, the linker will approximate the set of address taken functions,
but it will leave longjmp unprotected.
I used the following program to test, compiling it with different -guard
flags:
$ cl -c t.c -guard:cf
$ lld-link t.obj -guard:cf
#include <setjmp.h>
#include <stdio.h>
jmp_buf buf;
void g() {
printf("before longjmp\n");
fflush(stdout);
longjmp(buf, 1);
}
void f() {
if (setjmp(buf)) {
printf("setjmp returned non-zero\n");
return;
}
g();
}
int main() {
f();
printf("hello world\n");
}
In particular, the program aborts when the code is compiled *without*
-guard:cf and linked with -guard:cf. That indicates that longjmps are
protected.
Reviewers: ruiu, inglorion, amccarth
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D43217
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325047
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Tue, 13 Feb 2018 20:09:13 +0000 (20:09 +0000)]
[GISel]: Add Pattern Matcher for G_FMUL.
https://reviews.llvm.org/D43206
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325044
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Tue, 13 Feb 2018 20:09:11 +0000 (20:09 +0000)]
[GISel]: Make Pattern matcher for FADD commutative
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325043
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Tue, 13 Feb 2018 20:03:32 +0000 (20:03 +0000)]
[AMDGPU] Cleanup in memory legalizer tests. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325042
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 13 Feb 2018 19:54:00 +0000 (19:54 +0000)]
Document the shortcomings of DwarfExpression::addMachineReg().
Also make a drive-by-fix of a bug in the subregister scan code that
only triggers with an incomplete or otherwise very irregular machine
description.
rdar://problem/
37404493
This re-applies r324972 with an early exit in the case of a complete
failure to make this commit NFC again as intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325041
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 13 Feb 2018 18:48:27 +0000 (18:48 +0000)]
[InstCombine] fix test comment and add vector test; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325039
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 13 Feb 2018 18:22:53 +0000 (18:22 +0000)]
[InstCombine, InstSimplify] (re)move tests, regenerate checks; NFC
The InstCombine integer mul test file had tests that belong in InstSimplify
(including fmul tests). Move things to where they belong and auto-generate
complete checks for everything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325037
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 13 Feb 2018 18:15:27 +0000 (18:15 +0000)]
[Debugify] Avoid verifier failure on non-definition subprograms
If a function doesn't have an exact definition, don't apply debugify
metadata as it triggers a DIVerifier failure.
The issue is that it's invalid to have DILocations inside a DISubprogram
which isn't a definition ("scope points into the type hierarchy!").
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325036
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 13 Feb 2018 18:15:26 +0000 (18:15 +0000)]
[DeadStoreElimination] Salvage debug info from dead insts
According to `llvm-dwarfdump --statistics` this salvages 43 additional
unique source variables in a stage2 build of clang. It increases the
size of the .debug_loc section by 0.002% (or 2864 bytes).
Differential Revision: https://reviews.llvm.org/D43220
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325035
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 13 Feb 2018 18:14:38 +0000 (18:14 +0000)]
Revert r324903 "[AArch64] Refactor identification of SIMD immediates"
It caused "Cannot select: t33: f64 = AArch64ISD::FMOV Constant:i32<0>"
in Chromium builds. See PR36369.
> Get rid of icky goto loops and make the code easier to maintain (NFC).
>
> Differential revision: https://reviews.llvm.org/D42723
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325034
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Tue, 13 Feb 2018 18:08:26 +0000 (18:08 +0000)]
[CodeGen] Print bundled instructions using the MIR syntax in -debug output
Old syntax:
BUNDLE implicit-def %r0, implicit-def %r1, implicit %r2
* %r0 = SOME_OP %r2
* %r1 = ANOTHER_OP internal %r0
New syntax:
BUNDLE implicit-def %r0, implicit-def %r1, implicit %r2 {
%r0 = SOME_OP %r2
%r1 = ANOTHER_OP internal %r0
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325032
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Tue, 13 Feb 2018 18:00:25 +0000 (18:00 +0000)]
[AMDGPU] Change constant addr space to 4
Differential Revision: https://reviews.llvm.org/D43170
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325030
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Feb 2018 16:25:27 +0000 (16:25 +0000)]
[DAGCombiner] Add one use check to fold (not (and x, y)) -> (or (not x), (not y))
Summary:
If the and has an additional use we shouldn't invert it. That creates an additional instruction.
While there add a one use check to the transform above that looked similar.
Reviewers: spatel, RKSimon
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D43225
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325019
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Feb 2018 16:25:25 +0000 (16:25 +0000)]
[X86] Add combine to shrink 64-bit ands when one input is an any_extend and the other input guarantees upper 32 bits are 0.
Summary: This gets the shift case from PR35792.
Reviewers: spatel, RKSimon
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D43222
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325018
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 13 Feb 2018 15:35:07 +0000 (15:35 +0000)]
[Hexagon] Simplify some code, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325014
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 13 Feb 2018 15:34:29 +0000 (15:34 +0000)]
[Hexagon] Remove unnecessary check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325013
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Tue, 13 Feb 2018 15:34:09 +0000 (15:34 +0000)]
[ARM] Allow half types in ConstantPool
Change ARMConstantIslandPass to:
- accept f16 literals as litpool entries,
- if the litpool needs to be inserted in the middle of a big block, then we
need to 4-byte align the next instruction in ARM mode.
Differential Revision: https://reviews.llvm.org/D42784
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325012
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 13 Feb 2018 14:55:07 +0000 (14:55 +0000)]
[DAG] fix type of undef returned by getNode()
The bug has been lying dormant, but apparently was never exposed, until
after rL324941 because we didn't return the correct result
for shifts with undef operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325010
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Tue, 13 Feb 2018 14:48:39 +0000 (14:48 +0000)]
Revert r325001: [CallSiteSplitting] Support splitting of blocks with instrs before call.
Due to memsan not being happy with the array of ValueToValue maps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325009
91177308-0d34-0410-b5e6-
96231b3b80d8
Ivan A. Kosarev [Tue, 13 Feb 2018 14:44:25 +0000 (14:44 +0000)]
[IR] Fix creating mutable versions of TBAA access tags
Due to a typo in D41565, mutable TBAA tags created with
createMutableTBAAAccessTag() lose their base types. This patch
fixes that typo and updates tests respectively.
Differential Revision: https://reviews.llvm.org/D42364
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325008
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Tue, 13 Feb 2018 14:17:00 +0000 (14:17 +0000)]
[CallSiteSplitting] Clear ValueToValue maps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325006
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Tue, 13 Feb 2018 13:51:51 +0000 (13:51 +0000)]
[CallSiteSplitting] Dereference pointer earlier.
This should make the sanitizers happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325004
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 13 Feb 2018 13:16:26 +0000 (13:16 +0000)]
[InstCombine] Simplify getLogBase2 case for scalar/splats. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325003
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Tue, 13 Feb 2018 12:22:32 +0000 (12:22 +0000)]
[CallSiteSplitting] Fix new-pm test, as TargetIRAnalysis is run earlier now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325002
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Tue, 13 Feb 2018 12:00:48 +0000 (12:00 +0000)]
[CallSiteSplitting] Support splitting of blocks with instrs before call.
For basic blocks with instructions between the beginning of the block
and a call we have to duplicate the instructions before the call in all
split blocks and add PHI nodes for uses of the duplicated instructions
after the call.
Currently, the threshold for the number of instructions before a call
is quite low, to keep the impact on binary size low.
Reviewers: junbuml, mcrosier, davidxl, davide
Reviewed By: junbuml
Differential Revision: https://reviews.llvm.org/D41860
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325001
91177308-0d34-0410-b5e6-
96231b3b80d8
Andre Vieira [Tue, 13 Feb 2018 11:46:38 +0000 (11:46 +0000)]
[ARM] Don't print "Requires NEON" error message for M-profile
Differential Revision: https://reviews.llvm.org/D43125
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325000
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Ivchenko [Tue, 13 Feb 2018 10:58:19 +0000 (10:58 +0000)]
[X86] Rename function main->foo in CodeGen/X86/pr35316.ll. NFC
Using "void main" might be confusing for some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324997
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Tue, 13 Feb 2018 10:29:03 +0000 (10:29 +0000)]
[Thumb] Handle addressing mode AddrMode5FP16
This addressing mode wasn't checked, so we were running in an assert.
Differential Revision: https://reviews.llvm.org/D43179
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324996
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Tue, 13 Feb 2018 10:02:52 +0000 (10:02 +0000)]
[LoopInterchange] Check number of latch successors before accessing them.
In cases where the OuterMostLoopLatchBI only has a single successor,
accessing the second successor will fail.
This fixes a failure when building the test-suite with loop-interchange
enabled.
Reviewers: mcrosier, karthikthecool, davide
Reviewed by: karthikthecool
Differential Revision: https://reviews.llvm.org/D42906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324994
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Feb 2018 07:28:28 +0000 (07:28 +0000)]
[X86] Add a test case showing blcic matching being broken by an and mask applied to the input. NFC
Playing around with other BMI/TBM instructions after PR35792 and saw this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324987
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Feb 2018 05:33:39 +0000 (05:33 +0000)]
[X86] Add a blsr test case with a shift from PR35792. NFC
The blsr pattern here is missed because the add is shrunk, but the and is not. This leaves an any_extend between them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324986
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Feb 2018 04:19:26 +0000 (04:19 +0000)]
[X86] Teach EVEX->VEX pass to turn VRNDSCALE into VROUND when bits 7:4 of the immediate are 0 and the regular EVEX->VEX checks pass.
Bits 7:4 control the scale part of the operation. If the scale is 0 the behavior is equivalent to VROUND.
Fixes PR36246
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324985
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Feb 2018 04:19:23 +0000 (04:19 +0000)]
[X86] Autogenerate complete checks. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324984
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 13 Feb 2018 03:34:23 +0000 (03:34 +0000)]
[Utils] Salvage debug info from all no-op casts
We already try to salvage debug values from no-op bitcasts and inttoptr
instructions: we should handle ptrtoint instructions as well.
This saves an additional 24,444 debug values in a stage2 build of clang,
and (according to llvm-dwarfdump --statistics) provides an additional
289 unique source variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324982
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 13 Feb 2018 01:52:30 +0000 (01:52 +0000)]
Revert "Rewrite the cached map used for locating the most precise DIE among inlined subroutines for a given address."
Seeing some inlining missing in internal uses of symbolizer. I'll work
on a reproduction, tests, improvements & recommit as soon as possible.
(Chandler would like it to be known that this improvement did make
check-llvm 4x faster... - so there's certainly some fairly good
motivation to push on fixing/figuring this out & getting it back in)
This reverts commit r321345.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324981
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Feb 2018 01:49:58 +0000 (01:49 +0000)]
[X86] Use getTypeAction in most places that were checking ExperimentalVectorWideningLegalization.
This will allow more flexibility in what types we legalize via widening or not. This should help with a couple lines in D41062.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324980
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Feb 2018 01:36:27 +0000 (01:36 +0000)]
[X86] Remove duplicate CHECK-LABEL line the update script didn't delete when I converted the test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324979
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 13 Feb 2018 01:17:35 +0000 (01:17 +0000)]
Revert "Document the shortcomings of DwarfExpression::addMachineReg()."
This reverts commit r324972. This commit broke a bot, so perhaps it is
testable after all?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324977
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 13 Feb 2018 01:09:52 +0000 (01:09 +0000)]
[Utils] Salvage debug info of DCE'ed mul/sdiv/srem instructions
Here are the number of additional debug values salvaged in a stage2
build of clang:
63 SALVAGE: MUL
1250 SALVAGE: SDIV
(No values were salvaged from `srem` instructions in this experiment,
but it's a simple case to handle so we might as well.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324976
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 13 Feb 2018 01:09:49 +0000 (01:09 +0000)]
[Utils] Salvage debug info of DCE'ed shl/lhsr/ashr instructions
Here are the number of additional debug values salvaged in a stage2
build of clang:
1912 SALVAGE: ASHR
405 SALVAGE: LSHR
249 SALVAGE: SHL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324975
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 13 Feb 2018 01:09:47 +0000 (01:09 +0000)]
[Utils] Salvage the debug info of DCE'ed 'sub' instructions
This salvages 14 debug values in a stage2 build of clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324974
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 13 Feb 2018 01:09:46 +0000 (01:09 +0000)]
[Utils] Salvage the debug info of DCE'ed 'xor' instructions
This salvages 259 debug values in a stage2 build of clang.
Differential Revision: https://reviews.llvm.org/D43207
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324973
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 13 Feb 2018 01:02:56 +0000 (01:02 +0000)]
Document the shortcomings of DwarfExpression::addMachineReg().
Also make a drive-by-fix of a bug in the subregister scan code that
only triggers with an incomplete or otherwise very irregular machine
description.
rdar://problem/
37404493
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324972
91177308-0d34-0410-b5e6-
96231b3b80d8
Volkan Keles [Tue, 13 Feb 2018 00:47:46 +0000 (00:47 +0000)]
GlobalISel: IRTranslate llvm.fmuladd.* intrinsic
Reviewers: qcolombet, ab, dsanders, aditya_nandakumar, bogner
Reviewed By: qcolombet
Subscribers: rovka, kristof.beyls, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D43090
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324971
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Feb 2018 23:51:23 +0000 (23:51 +0000)]
[InstSimplify] allow exp/log simplifications with only 'reassoc' FMF
These intrinsic folds were added with D41381, but only allowed with isFast().
That's more than necessary because FMF has 'reassoc' to apply to these
kinds of folds after D39304, and that's all we need in these cases.
Differential Revision: https://reviews.llvm.org/D43160
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324967
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Mon, 12 Feb 2018 23:47:38 +0000 (23:47 +0000)]
[WebAssembly] Update ADT/TripleTest.cpp now that default file format has changed
Differential Revision: https://reviews.llvm.org/D43212
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324966
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 12 Feb 2018 23:43:10 +0000 (23:43 +0000)]
[X86] Auto generate complete checks. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324964
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Feb 2018 23:39:10 +0000 (23:39 +0000)]
[InstSimplify] change tests to 'fast' to reflect current folds
The diff to use 'reassoc' is part of D43160; it should not have
been made with rL324961. Reverting that part here, so we'll
see the intended diff with the code change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324963
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Mon, 12 Feb 2018 23:37:27 +0000 (23:37 +0000)]
[Dominators] Always recalculate postdominators when update yields different roots
Summary:
This patch makes postdominators always recalculate the tree when an update causes to change the tree roots.
As @dmgreen noticed in [[ https://reviews.llvm.org/D41298 | D41298 ]], the previous implementation was not conservative enough and it was possible to end up with a PostDomTree that was different than a freshly computed one.
The patch also compares postdominators with a freshly computed tree at the end of full verification to make sure we don't hit similar issues in the future.
This should (ideally) be also backported to 6.0 before the release, although I don't have any reports of this causing an observable error. It should be safe to do it even if it's late in the release, as the change only makes the current behavior more conservative.
Reviewers: dmgreen, dberlin, davide, brzycki, grosser
Reviewed By: brzycki, grosser
Subscribers: llvm-commits, dmgreen
Differential Revision: https://reviews.llvm.org/D43140
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324962
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Feb 2018 23:18:11 +0000 (23:18 +0000)]
[InstSimplify] consolidate tests for log-exp inverse folds
Some tests didn't add much value because we already show stronger
constraints for the folds in other tests, so the weaker versions
were deleted.
Moved the remaining tests into 1 file because the folds are
very similar and handled from 1 place in the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324961
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Neilson [Mon, 12 Feb 2018 23:06:55 +0000 (23:06 +0000)]
[InstCombine] Simplify MemTransferInst's source and dest alignments separately
Summary:
This change is part of step five in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the
InstCombine pass to cease using the deprecated MemoryIntrinsic::getAlignment() method, and
instead we use the separate getSourceAlignment and getDestAlignment APIs to simplify
the source and destination alignment attributes separately.
Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278,
rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774,
rL324781, rL324784, rL324955 )
Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
MemIntrinsicInst::[get|set]Alignment() methods.
Reference
http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20151109/312083.html
Reviewers: majnemer, bollu, efriedma
Reviewed By: efriedma
Subscribers: efriedma, llvm-commits
Differential Revision: https://reviews.llvm.org/D42871
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324960
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Mon, 12 Feb 2018 22:42:13 +0000 (22:42 +0000)]
Revert "[LSR] Avoid UB overflow when examining reuse opportunities"
This reverts commit r324943.
Breaking bots, reverting for Gerolf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324958
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Mon, 12 Feb 2018 22:41:29 +0000 (22:41 +0000)]
[WebAssembly] MC: Remove redundant struct types
Differential Revision: https://reviews.llvm.org/D43210
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324957
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Neilson [Mon, 12 Feb 2018 22:39:47 +0000 (22:39 +0000)]
[SafeStack] Use updated CreateMemCpy API to set more accurate source and destination alignments.
Summary:
This change is part of step five in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the
creation of memcpys in the SafeStack pass to set the alignment of the destination object to
its stack alignment while separately setting the source byval arguments alignment to its
alignment.
Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
and [get|set]SourceAlignment() instead. (rL323886, rL323891, rL324148, rL324273, rL324278,
rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774,
rL324781, rL324784 )
Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
MemIntrinsicInst::[get|set]Alignment() methods.
Reference
http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20151109/312083.html
Reviewers: eugenis, bollu
Reviewed By: eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D42710
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324955
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 12 Feb 2018 22:38:34 +0000 (22:38 +0000)]
[X86] Reverse the operand order of the autoupgrade of the kunpack builtins.
The second operand needs to be in the lower bits of the concatenation. This matches llvm 5.0, gcc, and icc behavior.
Fixes PR36360.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324953
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Mon, 12 Feb 2018 22:29:51 +0000 (22:29 +0000)]
[WebAssembly] MC: Remove redundant `private` specifiers
This is inline with the other MCSection and MCSymbol subclasses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324950
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Feb 2018 22:19:24 +0000 (22:19 +0000)]
[x86] add select test to show there's no single right answer (PR28968); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324947
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 12 Feb 2018 22:09:57 +0000 (22:09 +0000)]
Simplify switch statement (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324945
91177308-0d34-0410-b5e6-
96231b3b80d8
Gerolf Hoflehner [Mon, 12 Feb 2018 21:49:32 +0000 (21:49 +0000)]
[LSR] Avoid UB overflow when examining reuse opportunities
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324943
91177308-0d34-0410-b5e6-
96231b3b80d8
Jacob Gravelle [Mon, 12 Feb 2018 21:41:12 +0000 (21:41 +0000)]
[WebAssembly] Fix casting MCSymbol to MCSymbolWasm on ELF
Summary:
wasm32-unknown-unknown-elf has MCSymbols that are not MCSymbolWasms, so
we need a non-asserting cast here.
Reviewers: dschuff, sunfish
Subscribers: jfb, sbc100, aheejin, llvm-commits
Differential Revision: https://reviews.llvm.org/D43205
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324942
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Feb 2018 21:37:27 +0000 (21:37 +0000)]
[DAG] make binops with undef operands consistent with IR
This started by noticing that scalar and vector types were producing different results with div ops in PR36305:
https://bugs.llvm.org/show_bug.cgi?id=36305
...but the problem is bigger. I couldn't keep it straight without a table, so I'm attaching that as a PDF to
the review. The x86 tests in undef-ops.ll correspond to that table.
Green means that instsimplify and the DAG agree on the result for all types.
Red means the DAG was returning undef when IR was not.
Yellow means the DAG was returning a non-undef result when IR returned undef.
This patch assumes that we're currently doing the right thing in IR.
Note: I couldn't find any problems with lowering vector constants as the code comments were warning,
but those comments were written long ago in rL36413 .
Differential Revision: https://reviews.llvm.org/D43141
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324941
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 12 Feb 2018 21:18:11 +0000 (21:18 +0000)]
[X86] Simplify X86DAGToDAGISel::matchBEXTRFromAnd by creating an X86ISD::BEXTR node and calling Select. Add isel patterns to recognize this node.
This removes a bunch of special case code for selecting the immediate and folding loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324939
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 12 Feb 2018 21:18:09 +0000 (21:18 +0000)]
[X86] Remove unused multiclass argument. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324938
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Mon, 12 Feb 2018 21:14:21 +0000 (21:14 +0000)]
[GlobalMerge] Allow merging of dllexported variables
If merging them, the dllexport attribute needs to be brought along
to the new GlobalAlias.
Differential Revision: https://reviews.llvm.org/D43192
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324937
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 12 Feb 2018 21:11:23 +0000 (21:11 +0000)]
Fix the syntax highlighting of strings in dwarfdump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324936
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 12 Feb 2018 21:11:14 +0000 (21:11 +0000)]
Factor out common condition into an easier to understand helper function (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324935
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 12 Feb 2018 21:02:45 +0000 (21:02 +0000)]
Move the debuginfo-dce-or test into debuginfo-variables.ll, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324933
91177308-0d34-0410-b5e6-
96231b3b80d8
Volodymyr Sapsai [Mon, 12 Feb 2018 20:43:31 +0000 (20:43 +0000)]
Revert "[ThinLTO] Add GraphTraits for FunctionSummaries"
It caused assertion failure
Assertion failed: (!DD.IsLambda && !MergeDD.IsLambda && "faked up lambda definition?"), function MergeDefinitionData, file /Users/buildslave/jenkins/workspace/clang-stage1-configure-RA/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp, line 1675.
on the second stage build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324932
91177308-0d34-0410-b5e6-
96231b3b80d8
Volodymyr Sapsai [Mon, 12 Feb 2018 20:42:18 +0000 (20:42 +0000)]
Revert "Follow on to rL324854 (Added tests)" as part of r324854 revert.
r324854 caused broken build on the second stage build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324931
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Linder [Mon, 12 Feb 2018 19:45:54 +0000 (19:45 +0000)]
[DebugInfo] Unify ChecksumKind and Checksum value in DIFile
Rather than encode the absence of a checksum with a Kind variant, instead put
both the kind and value in a struct and wrap it in an Optional.
Differential Revision: http://reviews.llvm.org/D43043
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324928
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Feb 2018 19:39:21 +0000 (19:39 +0000)]
[InstCombine] X / (X * Y) --> 1.0 / Y
This is similar to the instsimplify fold added with D42385
( rL323716 )
...but this can't be in instsimplify because we're creating/morphing
a different instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324927
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Feb 2018 19:23:39 +0000 (19:23 +0000)]
[InstCombine] add tests for missing fdiv fold; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324926
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Feb 2018 19:14:01 +0000 (19:14 +0000)]
[InstCombine] regenerate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324924
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Feb 2018 18:38:35 +0000 (18:38 +0000)]
[InstCombine] various clean-ups for div transforms; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324922
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Mon, 12 Feb 2018 17:56:55 +0000 (17:56 +0000)]
[LICM] update BlockColors after splitting predecessors
Update BlockColors after splitting predecessors. Do not allow splitting
EHPad for sinking when the BlockColors is not empty, so we can
simply assign predecessor's color to the new block.
Fixes PR36184
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324916
91177308-0d34-0410-b5e6-
96231b3b80d8
Abderrazek Zaafrani [Mon, 12 Feb 2018 17:35:42 +0000 (17:35 +0000)]
[AArch64] Fixes for ARMv8.2-A FP16 scalar intrinsic - llvm portion
https://reviews.llvm.org/D42993
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324912
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 12 Feb 2018 17:21:28 +0000 (17:21 +0000)]
[X86] Add missing scheduling class tag for i64 absolute address moves
Expand existing SchedRW to encompass these like it did for the other memory offset movs - added comments to closing braces to keep track of def scopes.
We only tagged it with the itinerary class, so completeness checks were erroneously passed (PR35639).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324910
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 12 Feb 2018 17:03:11 +0000 (17:03 +0000)]
[AArch64] Improve v8.1-A code-gen for atomic load-and
Armv8.1-A added an atomic load-clear instruction (which performs bitwise
and with the complement of it's operand), but not a load-and
instruction. Our current code-generation for atomic load-and always
inserts an MVN instruction to invert its argument, even if it could be
folded into a constant or another instruction.
This adds lowering early in selection DAG to convert a load-and
operation into an xor with -1 and a load-clear, allowing the normal DAG
optimisations to work on it.
To do this, I've had to add a new ISD opcode, ATOMIC_LOAD_CLR. I don't
see any easy way to do this with an AArch64-specific ISD node, because
the code-generation for atomic operations assumes the SDNodes are of
type AtomicSDNode.
I've left the old tablegen patterns in because they are still needed for
global isel.
Differential revision: https://reviews.llvm.org/D42478
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324908
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 12 Feb 2018 16:59:04 +0000 (16:59 +0000)]
[X86][AVX512] Add missing scheduling class tag for KMOVB/KMOVW/KMOVD/KMOVQ moves/loads/stores.
We only tagged it with the itinerary class, so completeness checks were erroneously passed (PR35639).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324905
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Mon, 12 Feb 2018 16:41:41 +0000 (16:41 +0000)]
[AArch64] Refactor identification of SIMD immediates
Get rid of icky goto loops and make the code easier to maintain (NFC).
Differential revision: https://reviews.llvm.org/D42723
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324903
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 12 Feb 2018 16:18:36 +0000 (16:18 +0000)]
[X86][AVX512] Add missing scheduling class tag for VMOVQ/VMOVHLPS/VMOVLHPS/VMOVHPD/VMOVHPS/VMOVLPD/VMOVLPS
Tag AVX512 variants to match SSE/AVX originals.
We only tagged it with the itinerary class, so completeness checks were erroneously passed (PR35639).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324901
91177308-0d34-0410-b5e6-
96231b3b80d8
Momchil Velikov [Mon, 12 Feb 2018 16:10:09 +0000 (16:10 +0000)]
Re-commit r324489: [DebugInfo] Improvements to representation of enumeration types (PR36168)
Differential Revision: https://reviews.llvm.org/D42734
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324899
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 12 Feb 2018 15:57:00 +0000 (15:57 +0000)]
[X86] Tag CET-IBT instruction scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324898
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 12 Feb 2018 15:52:59 +0000 (15:52 +0000)]
[X86][MMX] Add missing scheduling class tag for EMMS/FEMMS
We only tagged it with the itinerary class, so completeness checks were erroneously passed (PR35639).
AMD targets can perform these a lot quicker than WriteMicrocoded so will need an override in the models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324897
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 12 Feb 2018 15:02:49 +0000 (15:02 +0000)]
[NFC] Fix comment of class InstrStage
Patch by Wei-Ren Chen.
Differential Revision: https://reviews.llvm.org/D42905
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324894
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Mon, 12 Feb 2018 14:54:48 +0000 (14:54 +0000)]
[SLP] Take user instructions cost into consideration in insertelement vectorization.
Summary:
For better vectorization result we should take into consideration the
cost of the user insertelement instructions when we try to
vectorize sequences that build the whole vector. I.e. if we have the
following scalar code:
```
<Scalar code>
insertelement <ScalarCode>, ...
```
we should consider the cost of the last `insertelement ` instructions as
the cost of the scalar code.
Reviewers: RKSimon, spatel, hfinkel, mkuper
Subscribers: javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D42657
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324893
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 12 Feb 2018 14:22:03 +0000 (14:22 +0000)]
[AArch64] Improve v8.1-A code-gen for atomic load-subtract
Armv8.1-A added an atomic load-add instruction, but not a load-subtract
instruction. Our current code-generation for atomic load-subtract always
inserts a NEG instruction to negate it's argument, even if it could be
folded into a constant or another instruction.
This adds lowering early in selection DAG to convert a load-subtract
operation into a subtract and a load-add, allowing the normal DAG
optimisations to work on it.
I've left the old tablegen patterns in because they are still needed for
global isel.
Some of the tests in this patch are copied from D35375 by Chad Rosier (which
was abandoned).
Differential revision: https://reviews.llvm.org/D42477
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324892
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Feb 2018 14:14:56 +0000 (14:14 +0000)]
[InstCombine] various clean-ups for commonIDivTransforms; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324891
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicholas Wilson [Mon, 12 Feb 2018 13:17:09 +0000 (13:17 +0000)]
Test commit: reformat comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324889
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 12 Feb 2018 12:43:39 +0000 (12:43 +0000)]
Revert r324835 "[X86] Reduce Store Forward Block issues in HW"
It asserts building Chromium; see PR36346.
(This also reverts the follow-up r324836.)
> If a load follows a store and reloads data that the store has written to memory, Intel microarchitectures can in many cases forward the data directly from the store to the load, This "store forwarding" saves cycles by enabling the load to directly obtain the data instead of accessing the data from cache or memory.
> A "store forward block" occurs in cases that a store cannot be forwarded to the load. The most typical case of store forward block on Intel Core microarchiticutre that a small store cannot be forwarded to a large load.
> The estimated penalty for a store forward block is ~13 cycles.
>
> This pass tries to recognize and handle cases where "store forward block" is created by the compiler when lowering memcpy calls to a sequence
> of a load and a store.
>
> The pass currently only handles cases where memcpy is lowered to XMM/YMM registers, it tries to break the memcpy into smaller copies.
> breaking the memcpy should be possible since there is no atomicity guarantee for loads and stores to XMM/YMM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324887
91177308-0d34-0410-b5e6-
96231b3b80d8