OSDN Git Service

android-x86/external-llvm.git
6 years ago[X86] Add CMP8ri8 to load folding tables.
Craig Topper [Sun, 7 Jan 2018 06:24:21 +0000 (06:24 +0000)]
[X86] Add CMP8ri8 to load folding tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321949 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Remove assembler predicates from all AVX512 related feature flags.
Craig Topper [Sat, 6 Jan 2018 21:45:30 +0000 (21:45 +0000)]
[X86] Remove assembler predicates from all AVX512 related feature flags.

We don't do fine grained feature control like this on features prior to AVX512.

We do still have checks in place in the assembly parser itself that prevents %zmm references or %xmm16-31 from being parsed without at least -mattr=avx512f. Same for rounding control and mask operands. That will prevent the table matcher from matching for any instructions that need those features and that's probably good enough.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321947 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Remove memory forms of EVEX encoded vcvttss2si/vcvttsd2si from asm matcher...
Craig Topper [Sat, 6 Jan 2018 21:27:25 +0000 (21:27 +0000)]
[X86] Remove memory forms of EVEX encoded vcvttss2si/vcvttsd2si from asm matcher table.

This is also needed to fix PR35837.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321946 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add load folding pattern to EVEX vcvttss2si/vcvtsd2si.
Craig Topper [Sat, 6 Jan 2018 21:02:26 +0000 (21:02 +0000)]
[X86] Add load folding pattern to EVEX vcvttss2si/vcvtsd2si.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321945 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Remove an unnecessary VCVTTSD2SIrrb/VCVTSS2SIrrb instruction with no isel patte...
Craig Topper [Sat, 6 Jan 2018 21:02:22 +0000 (21:02 +0000)]
[X86] Remove an unnecessary VCVTTSD2SIrrb/VCVTSS2SIrrb instruction with no isel pattern that only existed for the assembler. Use VCVTTSD2SIrrb_Int instead.

For consistency use the _Int version of VCVTTSD2SIrr_Int and VCVTTSD2SIrm_Int for the assembler as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321944 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InlineFunction] Preserve calling convention when forwarding VarArgs.
Florian Hahn [Sat, 6 Jan 2018 20:56:27 +0000 (20:56 +0000)]
[InlineFunction] Preserve calling convention when forwarding VarArgs.

Reviewers: efriedma, rnk, davide

Reviewed By: rnk, davide

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321943 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InlineFunction] Preserve attributes when forwarding VarArgs.
Florian Hahn [Sat, 6 Jan 2018 20:46:00 +0000 (20:46 +0000)]
[InlineFunction] Preserve attributes when forwarding VarArgs.

Reviewers: rnk, efriedma

Reviewed By: rnk

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321942 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] Remove AsynchronousSymbolQuery while I debug an issue on one of the
Lang Hames [Sat, 6 Jan 2018 20:14:22 +0000 (20:14 +0000)]
[ORC] Remove AsynchronousSymbolQuery while I debug an issue on one of the
builders.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321941 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InlineFunction] Inline vararg functions that do not access varargs.
Florian Hahn [Sat, 6 Jan 2018 19:45:40 +0000 (19:45 +0000)]
[InlineFunction] Inline vararg functions that do not access varargs.

If the varargs are not accessed by a function, we can inline the
function.

Reviewers: dblaikie, chandlerc, davide, efriedma, rnk, hfinkel

Reviewed By: efriedma

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321940 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Remove memory forms of EVEX encoded vcvtsd2si/vcvtss2si from the assembler...
Craig Topper [Sat, 6 Jan 2018 19:20:33 +0000 (19:20 +0000)]
[X86] Remove memory forms of EVEX encoded vcvtsd2si/vcvtss2si from the assembler matcher table

We should always prefer the VEX encoded version of these instructions. There is no advantage to the EVEX version.

Fixes PR35837.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321939 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[TableGen] Make the ambiguous match debug messages from the AsmMatcherEmitter slightl...
Craig Topper [Sat, 6 Jan 2018 19:20:32 +0000 (19:20 +0000)]
[TableGen] Make the ambiguous match debug messages from the AsmMatcherEmitter slightly more useful.

Don't report ambiguous matches on different variants. Print the variant number in the output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321938 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] relax use constraint for min/max (~a, ~b) --> ~min/max(a, b)
Sanjay Patel [Sat, 6 Jan 2018 17:34:22 +0000 (17:34 +0000)]
[InstCombine] relax use constraint for min/max (~a, ~b) --> ~min/max(a, b)

In the minimal case, this won't remove instructions, but it still improves
uses of existing values.

In the motivating example from PR35834, it does remove instructions, and
sets that case up to be optimized by something like D41603:
https://reviews.llvm.org/D41603

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321936 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] add more tests for max(~a, ~b) and PR35834; NFC
Sanjay Patel [Sat, 6 Jan 2018 17:14:46 +0000 (17:14 +0000)]
[InstCombine] add more tests for max(~a, ~b) and PR35834; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321935 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[x86, MemCmpExpansion] allow 2 pairs of loads per block (PR33325)
Sanjay Patel [Sat, 6 Jan 2018 16:16:04 +0000 (16:16 +0000)]
[x86, MemCmpExpansion] allow 2 pairs of loads per block (PR33325)

This is the last step needed to fix PR33325:
https://bugs.llvm.org/show_bug.cgi?id=33325

We're trading branch and compares for loads and logic ops.
This makes the code smaller and hopefully faster in most cases.

The 24-byte test shows an interesting construct: we load the trailing scalar
elements into vector registers and generate the same pcmpeq+movmsk code that
we expected for a pair of full vector elements (see the 32- and 64-byte tests).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321934 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Rename the EVEX encoded GFNI instructions to start with a 'V'. NFC
Craig Topper [Sat, 6 Jan 2018 07:18:08 +0000 (07:18 +0000)]
[X86] Rename the EVEX encoded GFNI instructions to start with a 'V'. NFC

This makes the names consistent with the mnemonics like every other instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321931 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] When parsing rounding mode operands, provide a proper end location so we don...
Craig Topper [Sat, 6 Jan 2018 06:41:07 +0000 (06:41 +0000)]
[X86] When parsing rounding mode operands, provide a proper end location so we don't crash when trying to print an error message using it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321930 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Call lowerShuffleAsRepeatedMaskAndLanePermute from lowerV4I64VectorShuffle.
Craig Topper [Sat, 6 Jan 2018 06:08:04 +0000 (06:08 +0000)]
[X86] Call lowerShuffleAsRepeatedMaskAndLanePermute from lowerV4I64VectorShuffle.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321929 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Run dos2unix on a test file. NFC
Craig Topper [Sat, 6 Jan 2018 06:08:02 +0000 (06:08 +0000)]
[X86] Run dos2unix on a test file. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321928 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] Yet more debugging output to diagnose test failures.
Lang Hames [Sat, 6 Jan 2018 05:19:07 +0000 (05:19 +0000)]
[ORC] Yet more debugging output to diagnose test failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321927 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] Fix the counter type on SymbolStringPool entries.
Lang Hames [Sat, 6 Jan 2018 05:19:06 +0000 (05:19 +0000)]
[ORC] Fix the counter type on SymbolStringPool entries.

Hopefully this will fix the build failure in
http://lab.llvm.org:8011/builders/llvm-mips-linux/builds/3417

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321926 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] More debugging output to track down tester failures.
Lang Hames [Sat, 6 Jan 2018 04:35:51 +0000 (04:35 +0000)]
[ORC] More debugging output to track down tester failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321925 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] Temporarily adding some redundant asserts / debug output to aid in
Lang Hames [Sat, 6 Jan 2018 01:06:07 +0000 (01:06 +0000)]
[ORC] Temporarily adding some redundant asserts / debug output to aid in
debugging a tester failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321920 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] Fix a think-o in the current AsynchronousSymbolQuery test.
Lang Hames [Sat, 6 Jan 2018 01:06:05 +0000 (01:06 +0000)]
[ORC] Fix a think-o in the current AsynchronousSymbolQuery test.

This *should* be a no-op as far as the current failure is concerned, but needs
to be fixed anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321919 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Debugify] Handled unsized types
Vedant Kumar [Sat, 6 Jan 2018 00:37:01 +0000 (00:37 +0000)]
[Debugify] Handled unsized types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321918 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Utils] Simplify salvageDebugInfo, NFCI
Vedant Kumar [Fri, 5 Jan 2018 23:27:02 +0000 (23:27 +0000)]
[Utils] Simplify salvageDebugInfo, NFCI

Having a single call to findDbgUsers() allows salvageDebugInfo() to
return earlier.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321915 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add vcvtsd2sil/vcvtsd2siq etc. InstAliases to the EVEX-encoded instructions.
Craig Topper [Fri, 5 Jan 2018 23:13:54 +0000 (23:13 +0000)]
[X86] Add vcvtsd2sil/vcvtsd2siq etc. InstAliases to the EVEX-encoded instructions.

This matches their VEX equivalents.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321912 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRe-land "Fix faulty assertion in debug info"
Adrian McCarthy [Fri, 5 Jan 2018 23:01:04 +0000 (23:01 +0000)]
Re-land "Fix faulty assertion in debug info"

This had been reverted because the new test failed on non-X86 bots.  I moved
the new test to the appropriate subdirectory to correct this.

Differential Revision: https://reviews.llvm.org/D41264
Original submission:  r321122 (which was reverted by r321125)

This reverts commit 3c1639b5703c387a0d8cba2862803b4e68dff436.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321911 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] Re-apply just the AsynchronousSymbolLookup class from r321838 while I
Lang Hames [Fri, 5 Jan 2018 22:50:43 +0000 (22:50 +0000)]
[ORC] Re-apply just the AsynchronousSymbolLookup class from r321838 while I
investigate builder / test failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321910 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Hexagon] Even simpler patterns for sign- and zero-extending HVX vectors
Krzysztof Parzyszek [Fri, 5 Jan 2018 22:31:11 +0000 (22:31 +0000)]
[Hexagon] Even simpler patterns for sign- and zero-extending HVX vectors

Recommit r321897 with updated testcases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321908 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[DebugInfo] Align comments in debug_loc section
Bjorn Pettersson [Fri, 5 Jan 2018 22:20:30 +0000 (22:20 +0000)]
[DebugInfo] Align comments in debug_loc section

Summary:
This commit updates the BufferByteStreamer, used by DebugLocStream
to buffer bytes/comments to put in the debug_loc section, to
make sure that the Buffer and Comments vectors are synced.
Previously, when an SLEB128 or ULEB128 was emitted together with
a comment, the vectors could be out-of-sync if the LEB encoding
added several entries to the Buffer vectors, while we only added
a single entry to the Comments vector.

The goal with this is to get the comments in the debug_loc
section in the .s file correctly aligned.

Example (using ARM as target):
Instead of

  .byte 144                     @ sub-register DW_OP_regx
  .byte 128                     @ 256
  .byte 2                       @ DW_OP_piece
  .byte 147                     @ 8
  .byte 8                       @ sub-register DW_OP_regx
  .byte 144                     @ 257
  .byte 129                     @ DW_OP_piece
  .byte 2                       @ 8
  .byte 147                     @
  .byte 8                       @

we now get

  .byte 144                     @ sub-register DW_OP_regx
  .byte 128                     @ 256
  .byte 2                       @
  .byte 147                     @ DW_OP_piece
  .byte 8                       @ 8
  .byte 144                     @ sub-register DW_OP_regx
  .byte 129                     @ 257
  .byte 2                       @
  .byte 147                     @ DW_OP_piece
  .byte 8                       @ 8

Reviewers: JDevlieghere, rnk, aprantl

Reviewed By: aprantl

Subscribers: davide, Ka-Ka, uabelho, aemerson, javed.absar, kristof.beyls, llvm-commits, JDevlieghere

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321907 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoFix some opt-viewer test issues and disable on Windows.
Zachary Turner [Fri, 5 Jan 2018 22:05:13 +0000 (22:05 +0000)]
Fix some opt-viewer test issues and disable on Windows.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321905 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert r321894: it requires a part of another commit that is not ready yet
Krzysztof Parzyszek [Fri, 5 Jan 2018 21:57:43 +0000 (21:57 +0000)]
Revert r321894: it requires a part of another commit that is not ready yet

Commit message:
[Hexagon] Add patterns for sext_inreg of HVX vector types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321904 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add InstAliases for 'vmovd' with GR64 registers to select EVEX encoded instruct...
Craig Topper [Fri, 5 Jan 2018 21:57:23 +0000 (21:57 +0000)]
[X86] Add InstAliases for 'vmovd' with GR64 registers to select EVEX encoded instructions as well.

Without this we allow "vmovd %rax, %xmm0", but not "vmovd %rax, %xmm16"

This exists due to continue a silly bug where really old versions of the GNU assembler required movd instead of movq on these instructions. This compatibility hack then crept forward to avx version too, but we didn't propagate it to avx512.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321903 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert r321897: affected testcases were not updated
Krzysztof Parzyszek [Fri, 5 Jan 2018 21:50:15 +0000 (21:50 +0000)]
Revert r321897: affected testcases were not updated

Commit message:
[Hexagon] Even simpler patterns for sign- and zero-extending HVX vectors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321902 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agodwarfdump: Match the --uuid output with that of Darwin dwarfdump.
Adrian Prantl [Fri, 5 Jan 2018 21:44:17 +0000 (21:44 +0000)]
dwarfdump: Match the --uuid output with that of Darwin dwarfdump.
This option is widely used by scripts and there is no reason to break them.

rdar://problem/36032398

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321901 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Stop printing moves between VR64 and GR64 with 'movd' mnemonic. Use 'movq'...
Craig Topper [Fri, 5 Jan 2018 20:55:12 +0000 (20:55 +0000)]
[X86] Stop printing moves between VR64 and GR64 with 'movd' mnemonic. Use 'movq' instead.

This behavior existed to work with an old version of the gnu assembler on MacOS that only accepted this form. Newer versions of GNU assembler and the current LLVM derived version of the assembler on MacOS support movq as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321898 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Hexagon] Even simpler patterns for sign- and zero-extending HVX vectors
Krzysztof Parzyszek [Fri, 5 Jan 2018 20:49:26 +0000 (20:49 +0000)]
[Hexagon] Even simpler patterns for sign- and zero-extending HVX vectors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321897 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Hexagon] Add patterns for truncating HVX vector types
Krzysztof Parzyszek [Fri, 5 Jan 2018 20:48:03 +0000 (20:48 +0000)]
[Hexagon] Add patterns for truncating HVX vector types

Only non-bool vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321895 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Hexagon] Add patterns for sext_inreg of HVX vector types
Krzysztof Parzyszek [Fri, 5 Jan 2018 20:46:41 +0000 (20:46 +0000)]
[Hexagon] Add patterns for sext_inreg of HVX vector types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321894 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Hexagon] Add a bitcast to required type in LowerHvxMul
Krzysztof Parzyszek [Fri, 5 Jan 2018 20:45:34 +0000 (20:45 +0000)]
[Hexagon] Add a bitcast to required type in LowerHvxMul

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321893 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Hexagon] Add pattern for vsplat to v8i8
Krzysztof Parzyszek [Fri, 5 Jan 2018 20:43:56 +0000 (20:43 +0000)]
[Hexagon] Add pattern for vsplat to v8i8

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321892 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Hexagon] Set boolean contents in HexagonISelLowering
Krzysztof Parzyszek [Fri, 5 Jan 2018 20:41:50 +0000 (20:41 +0000)]
[Hexagon] Set boolean contents in HexagonISelLowering

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321891 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-cov] Change test to use FileCheck instead of grep.
Douglas Yung [Fri, 5 Jan 2018 20:00:18 +0000 (20:00 +0000)]
[llvm-cov] Change test to use FileCheck instead of grep.

Reviewed by Paul Robinson

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321888 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoFix -Wsign-compare warnings on Windows
Reid Kleckner [Fri, 5 Jan 2018 19:53:51 +0000 (19:53 +0000)]
Fix -Wsign-compare warnings on Windows

These arise because enums are 'int' by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321887 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoLimit size of non-GlobalValue name
Serge Guelton [Fri, 5 Jan 2018 19:41:19 +0000 (19:41 +0000)]
Limit size of non-GlobalValue name

Otherwise, in some extreme test case, very long names are created and the
compiler consumes large amount of memory. Size limit is set to a relatively
high value not to disturb debugging.

Compiler flag -non-global-value-max-name-size=<value> can be used to customize
the size.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321886 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-objcopy] Add --localize-hidden option
Jake Ehrlich [Fri, 5 Jan 2018 19:19:09 +0000 (19:19 +0000)]
[llvm-objcopy] Add --localize-hidden option

This change adds support in llvm-objcopy for GNU objcopy's --localize-hidden
option. This option changes every hidden or internal symbol into a local symbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321884 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[PDB] Correctly link S_FILESTATIC records.
Zachary Turner [Fri, 5 Jan 2018 19:12:40 +0000 (19:12 +0000)]
[PDB] Correctly link S_FILESTATIC records.

This is not a record type that clang currently generates,
but it is a record that is encountered in object files generated
by cl.  This record is unusual in that it refers directly to
the string table instead of indirectly to the string table via
the FileChecksums table.  Because of this, it was previously
overlooked and we weren't remapping the string indices at all.
This would lead to crashes in MSVC when trying to display a
variable whose debug info involved an S_FILESTATIC.

Original bug report by Alexander Ganea

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321883 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] add folds for min(~a, b) --> ~max(a, b)
Sanjay Patel [Fri, 5 Jan 2018 19:01:17 +0000 (19:01 +0000)]
[InstCombine] add folds for min(~a, b) --> ~max(a, b)

Besides the bug of omitting the inverse transform of max(~a, ~b) --> ~min(a, b),
the use checking and operand creation were off. We were potentially creating
repeated identical instructions of existing values. This led to infinite
looping after I added the extra folds.

By using the simpler m_Not matcher and not creating new 'not' ops for a and b,
we avoid that problem. It's possible that not using IsFreeToInvert() here is
more limiting than the simpler matcher, but there are no tests for anything
more exotic. It's also possible that we should relax the use checking further
to handle a case like PR35834:
https://bugs.llvm.org/show_bug.cgi?id=35834
...but we can make that a follow-up if it is needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321882 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-mt] Remove platform-specific path in test
Brian Gesiak [Fri, 5 Jan 2018 18:23:22 +0000 (18:23 +0000)]
[llvm-mt] Remove platform-specific path in test

Summary:
Remove a platform-specific path separator added to the llvm-mt help text test
in https://reviews.llvm.org/D41732.

Test Plan: `check-llvm`

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321881 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[MSF] Fix FPM interval calcluation
Zachary Turner [Fri, 5 Jan 2018 18:12:14 +0000 (18:12 +0000)]
[MSF] Fix FPM interval calcluation

We have some code to try to determine how many pieces an MSF
Free Page Map is split into, and this code had an off by one
error which would cause the calculation to be incorrect when
there were exactly 4096*k + 1 blocks in an MSF file.

Original investigation and patch outline by Colden Cullen.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321880 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRegionInfo: Use report_fatal_error instead of llvm_unreachable
Matt Arsenault [Fri, 5 Jan 2018 17:51:36 +0000 (17:51 +0000)]
RegionInfo: Use report_fatal_error instead of llvm_unreachable

Otherwise when using -verify-region-info in a release build the
error won't be emitted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321878 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Option] Add 'findNearest' method to catch typos
Brian Gesiak [Fri, 5 Jan 2018 17:10:39 +0000 (17:10 +0000)]
[Option] Add 'findNearest' method to catch typos

Summary:
Add a method `OptTable::findNearest`, which allows users of OptTable to
check user input for misspelled options. In addition, have llvm-mt
check for misspelled options. For example, if a user invokes
`llvm-mt /oyt:foo`, the error message will indicate that while an
option named `/oyt:` does not exist, `/out:` does.

The method ports the functionality of the `LookupNearestOption` method
from LLVM CommandLine to libLLVMOption. This allows tools like Clang
and Swift, which do not use CommandLine, to use this functionality to
suggest similarly spelled options.

As room for future improvement, the new method as-is cannot yet properly suggest
nearby "joined" options -- that is, for an option string "-FozBar", where
"-Foo" is the correct option name and "Bar" is the value being passed along
with the misspelled option, this method will calculate an edit distance of 4,
by deleting "Bar" and changing "z" to "o". It should instead calculate an edit
distance of just 1, by changing "z" to "o" and recognizing "Bar" as a
value. This commit includes a disabled test that expresses this limitation.

Test Plan: `check-llvm`

Reviewers: yamaguchi, v.g.vassilev, teemperor, ruiu, jroelofs

Reviewed By: jroelofs

Subscribers: jroelofs, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321877 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-cov] Temporarily disable multithreaded-report.test on Windows.
Max Moroz [Fri, 5 Jan 2018 16:43:24 +0000 (16:43 +0000)]
[llvm-cov] Temporarily disable multithreaded-report.test on Windows.

Summary: The test is failing because Windows do not support "diff -r".

Reviewers: Dor1s

Reviewed By: Dor1s

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321876 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoadd 'REQUIRES: object-emission' to test
Adrian Prantl [Fri, 5 Jan 2018 16:31:22 +0000 (16:31 +0000)]
add 'REQUIRES: object-emission' to test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321875 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoremove unnecessary target triple from generic test
Adrian Prantl [Fri, 5 Jan 2018 16:29:24 +0000 (16:29 +0000)]
remove unnecessary target triple from generic test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321874 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[BasicAA] Fix linearization of shifts beyond the bitwidth.
Davide Italiano [Fri, 5 Jan 2018 16:18:47 +0000 (16:18 +0000)]
[BasicAA] Fix linearization of shifts beyond the bitwidth.

Thanks to Simon Pilgrim for the reduced testcase.
Fixes PR35821.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321873 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SLP] Update more test checks, NFC.
Alexey Bataev [Fri, 5 Jan 2018 16:15:17 +0000 (16:15 +0000)]
[SLP] Update more test checks, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321872 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-cov] Multi-threaded implementation of prepareFileReports method.
Max Moroz [Fri, 5 Jan 2018 16:15:07 +0000 (16:15 +0000)]
[llvm-cov] Multi-threaded implementation of prepareFileReports method.

Summary:
Local testing has demonstrated a great speed improvement, compare the following:

1) Existing version:
```
$ time llvm-cov show -format=html -output-dir=report -instr-profile=... ...
The tool has been launched:                            00:00:00
Loading coverage data:                                 00:00:00
Get unique source files:                               00:00:33
Creating an index out of the source files:             00:00:34
Going into prepareFileReports:                         00:00:34
Going to emit summary information for each file:       00:28:55 <-- 28:21 min!
Going to emit links to files with no function:         00:28:55
Launching 32 threads for generating HTML files:        00:28:55

real  37m43.651s
user  112m5.540s
sys   7m39.872s
```

2) Multi-threaded version with 32 CPUs:
```
$ time llvm-cov show -format=html -output-dir=report -instr-profile=... ...
The tool has been launched:                            00:00:00
Loading coverage data:                                 00:00:00
Get unique source files:                               00:00:38
Creating an index out of the source files:             00:00:40
Going into prepareFileReports:                         00:00:40
Preparing file reports using 32 threads:               00:00:40
# Creating thread tasks for the following number of files: 16422
Going to emit summary information for each file:       00:01:57 <-- 1:17 min!
Going to emit links to files with no function:         00:01:58
Launching 32 threads for generating HTML files:        00:01:58

real  11m2.044s
user  134m48.124s
sys   7m53.388s
```

Reviewers: vsk, morehouse

Reviewed By: vsk

Subscribers: Dor1s, llvm-commits, kcc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321871 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SLP] Update test checks, NFC.
Alexey Bataev [Fri, 5 Jan 2018 15:20:40 +0000 (15:20 +0000)]
[SLP] Update test checks, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321870 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SLP] Update tests checks, NFC.
Alexey Bataev [Fri, 5 Jan 2018 14:40:04 +0000 (14:40 +0000)]
[SLP] Update tests checks, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321869 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Regenerate illegal move test
Simon Pilgrim [Fri, 5 Jan 2018 14:24:03 +0000 (14:24 +0000)]
[X86] Regenerate illegal move test

Recommitting after fixing case-sensitive issue in the RUN command

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321868 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ARM] Issue an erorr when non-general-purpose registers are used in address operands
Momchil Velikov [Fri, 5 Jan 2018 13:28:10 +0000 (13:28 +0000)]
[ARM] Issue an erorr when non-general-purpose registers are used in address operands

Currently the assembler would accept, e.g. `ldr r0, [s0, #12]` and similar.
This patch add checks that only general-purpose registers are used in address
operands, shifted registers, and shift amounts.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321866 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[AArch64] Fix -mcpu option in aarch64-combine-fmul-fsub.mir (NFC)
Florian Hahn [Fri, 5 Jan 2018 11:17:48 +0000 (11:17 +0000)]
[AArch64] Fix -mcpu option in aarch64-combine-fmul-fsub.mir (NFC)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321865 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[DebugInfo] Don't crash when given invalid DWARFv5 line table prologue.
Jonas Devlieghere [Fri, 5 Jan 2018 10:03:02 +0000 (10:03 +0000)]
[DebugInfo] Don't crash when given invalid DWARFv5 line table prologue.

This patch replaces an assertion with an explicit check for the validity
of the FORM parameters. The assertion was triggered when the DWARFv5
line table contained a zero address size.

This fixes OSS-Fuzz Issue 4644
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4644

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321863 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[DAGCombine] Fix for PR37563
Sam Parker [Fri, 5 Jan 2018 08:47:23 +0000 (08:47 +0000)]
[DAGCombine] Fix for PR37563

While searching for loads to be narrowed, equal sized loads were not
added to the list, resulting in anyext loads not being converted to
zext loads.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321862 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] Re-revert r321838: Tests are still failing.
Lang Hames [Fri, 5 Jan 2018 03:10:15 +0000 (03:10 +0000)]
[ORC] Re-revert r321838: Tests are still failing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321858 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[GISel]: Don't create G_MUL with 1 during translation of GEP
Aditya Nandakumar [Fri, 5 Jan 2018 02:56:28 +0000 (02:56 +0000)]
[GISel]: Don't create G_MUL with 1 during translation of GEP

When element size is 1, it's just wasteful to create MUL with 1.
https://reviews.llvm.org/D41738

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321857 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] Re-apply r321838 - Addition of new ORC core APIs.
Lang Hames [Fri, 5 Jan 2018 02:21:02 +0000 (02:21 +0000)]
[ORC] Re-apply r321838 - Addition of new ORC core APIs.

The original commit broke the builders due to a think-o in an assertion:
AsynchronousSymbolQuery's constructor needs to check the callback member
variables, not the constructor arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321853 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoDebug Info: Support DW_AT_calling_convention on composite types.
Adrian Prantl [Fri, 5 Jan 2018 01:13:37 +0000 (01:13 +0000)]
Debug Info: Support DW_AT_calling_convention on composite types.

This implements the DWARF 5 feature described at
http://www.dwarfstd.org/ShowIssue.php?issue=141215.1

This allows a consumer to understand whether a composite data type is
trivially copyable and thus should be passed by value instead of by
reference. The canonical example is being able to distinguish the
following two types:

  // S is not trivially copyable because of the explicit destructor.
  struct S {
     ~S() {}
  };

  // T is a POD type.
  struct T {
     ~T() = default;
  };

This patch adds two new (DI)flags to LLVM metadata: TypePassByValue
and TypePassByReference.

<rdar://problem/36034922>
Differential Revision: https://reviews.llvm.org/D41743

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321844 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert r321838 -- It broke some of the builders.
Lang Hames [Fri, 5 Jan 2018 00:29:37 +0000 (00:29 +0000)]
Revert r321838 -- It broke some of the builders.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321842 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoWholeProgramDevirt: Simplify ORE getter mechanism for old PM. NFCI.
Peter Collingbourne [Fri, 5 Jan 2018 00:27:51 +0000 (00:27 +0000)]
WholeProgramDevirt: Simplify ORE getter mechanism for old PM. NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321841 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoremove unreferenced footnotes
Tim Hammerquist [Fri, 5 Jan 2018 00:24:55 +0000 (00:24 +0000)]
remove unreferenced footnotes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321840 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agofix invalid footnote syntax
Tim Hammerquist [Fri, 5 Jan 2018 00:24:54 +0000 (00:24 +0000)]
fix invalid footnote syntax

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321839 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] Add new core ORC APIs (Core.h/Core.cpp): VSO, AsynchronousSymbolQuery and
Lang Hames [Fri, 5 Jan 2018 00:04:16 +0000 (00:04 +0000)]
[ORC] Add new core ORC APIs (Core.h/Core.cpp): VSO, AsynchronousSymbolQuery and
SymbolSource.

These new APIs are a first stab at tackling some current shortcomings of ORC,
especially in performance and threading support.

VSO (Virtual Shared Object) is a symbol table representing the symbol
definitions of a set of modules that behave as if they had been statically
linked together into a shared object or dylib. Symbol definitions, either
pre-defined addresses or lazy definitions, can be added and queries for symbol
addresses made. The table applies the same linkage strength rules that static
linkers do when constructing a dylib or shared object: duplicate definitions
result in errors, strong definitions override weak or common ones. This class
should improve symbol lookup speed by providing centralized symbol tables (as
compared to the findSymbol implementation in the in-tree ORC layers, which
maintain one symbol table per object file / module added).

AsynchronousSymbolQuery is a query for the addresses of a set of symbols.
Query results are returned via a callback once they become available. Querying
for a set of symbols, rather than one symbol at a time (as the current lookup
scheme does) the JIT has the opportunity to make better use of available
resources (e.g. by spawning multiple jobs to materialize the requested symbols
if possible). Returning results via a callback makes queries asynchronous, so
queries from multiple threads of JIT'd code can proceed simultaneously.

SymbolSource represents a source of symbol definitions. It is used when
adding lazy symbol definitions to a VSO. Symbol definitions can be materialized
when needed or discarded if a stronger definition is found. Materializing on
demand via SymbolSources should (eventually) allow us to remove the lazy
materializers from JITSymbol, which will in turn allow the removal of many
current error checks and reduce the number of RPC round-trips involved in
materializing remote symbols. Adding a discard function allows sources to
discard symbol definitions (or mark them as available_externally), reducing the
amount of redundant code generated by the JIT for ODR symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321838 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] Actually compare pointer values as advertised (rather than comparing ref
Lang Hames [Fri, 5 Jan 2018 00:04:15 +0000 (00:04 +0000)]
[ORC] Actually compare pointer values as advertised (rather than comparing ref
counts). Oops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321837 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ORC] Add dereference operator to SymbolStringPtr.
Lang Hames [Fri, 5 Jan 2018 00:04:13 +0000 (00:04 +0000)]
[ORC] Add dereference operator to SymbolStringPtr.

Dereference yields a StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321836 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[DEBUG] Fix debug info test for NVPTX, NFC.
Alexey Bataev [Thu, 4 Jan 2018 23:50:24 +0000 (23:50 +0000)]
[DEBUG] Fix debug info test for NVPTX, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321835 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert "[JumpThreading] Preservation of DT and LVI across the pass"
Reid Kleckner [Thu, 4 Jan 2018 23:23:46 +0000 (23:23 +0000)]
Revert "[JumpThreading] Preservation of DT and LVI across the pass"

This reverts r321825, it causes crashes in Chromium. Reproducer
forthcoming.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321832 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[DEBUG] Fix the test for NVPTX, NFC.
Alexey Bataev [Thu, 4 Jan 2018 23:01:42 +0000 (23:01 +0000)]
[DEBUG] Fix the test for NVPTX, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321829 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add srem/udiv/urem by one combine tests
Simon Pilgrim [Thu, 4 Jan 2018 22:08:36 +0000 (22:08 +0000)]
[X86] Add srem/udiv/urem by one combine tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321826 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[JumpThreading] Preservation of DT and LVI across the pass
Brian M. Rzycki [Thu, 4 Jan 2018 21:57:32 +0000 (21:57 +0000)]
[JumpThreading] Preservation of DT and LVI across the pass

Summary:
See D37528 for a previous (non-deferred) version of this
patch and its description.

Preserves dominance in a deferred manner using a new class
DeferredDominance. This reduces the performance impact of
updating the DominatorTree at every edge insertion and
deletion. A user may call DDT->flush() within JumpThreading
for an up-to-date DT. This patch currently has one flush()
at the end of runImpl() to ensure DT is preserved across
the pass.

LVI is also preserved to help subsequent passes such as
CorrelatedValuePropagation. LVI is simpler to maintain and
is done immediately (not deferred). The code to perfom the
preversation was minimally altered and was simply marked
as preserved for the PassManager to be informed.

This extends the analysis available to JumpThreading for
future enhancements. One example is loop boundary threading.

Reviewers: dberlin, kuhar, sebpop

Reviewed By: kuhar, sebpop

Subscribers: hiraditya, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321825 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[AArch64] Improve code generation of vector build
Evandro Menezes [Thu, 4 Jan 2018 21:43:12 +0000 (21:43 +0000)]
[AArch64] Improve code generation of vector build

Instead of using, for example, `dup v0.4s, wzr`, which transfers between
register files, use the more efficient `movi v0.4s, #0` instead.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321824 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add scalar undef sdiv/srem/udiv/urem combine tests
Simon Pilgrim [Thu, 4 Jan 2018 21:33:19 +0000 (21:33 +0000)]
[X86] Add scalar undef sdiv/srem/udiv/urem combine tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321823 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[DEBUG] Add initial tests for debug info for NVPTX target, NFC.
Alexey Bataev [Thu, 4 Jan 2018 21:07:07 +0000 (21:07 +0000)]
[DEBUG] Add initial tests for debug info for NVPTX target, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321822 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Correct the execution domain for AVX1 VBROADCASTF128 to be FP instead of integer.
Craig Topper [Thu, 4 Jan 2018 20:56:21 +0000 (20:56 +0000)]
[X86] Correct the execution domain for AVX1 VBROADCASTF128 to be FP instead of integer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321821 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert "[X86] Regenerate test"
Amara Emerson [Thu, 4 Jan 2018 20:20:44 +0000 (20:20 +0000)]
Revert "[X86] Regenerate test"

This reverts r321814 as it was failing make check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321819 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-cov] Refactor "export" command implementation and add support for SOURCES.
Max Moroz [Thu, 4 Jan 2018 19:33:29 +0000 (19:33 +0000)]
[llvm-cov] Refactor "export" command implementation and add support for SOURCES.

Summary: Define an interface for Exporter + split JSON exporter into .h and .cpp.

Reviewers: vsk, morehouse

Reviewed By: vsk

Subscribers: llvm-commits, Dor1s, kcc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321815 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Regenerate test
Simon Pilgrim [Thu, 4 Jan 2018 18:48:42 +0000 (18:48 +0000)]
[X86] Regenerate test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321814 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[DAGCombine] Ensure SDNode use iterator is incremented properly.
Amara Emerson [Thu, 4 Jan 2018 18:38:45 +0000 (18:38 +0000)]
[DAGCombine] Ensure SDNode use iterator is incremented properly.

Fixes an ASAN bug found by oss-fuzz.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321813 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[docs] Update Scudo documentation
Kostya Kortchinsky [Thu, 4 Jan 2018 18:31:22 +0000 (18:31 +0000)]
[docs] Update Scudo documentation

Summary:
The documentation has fallen a bit behind, update it with the latest evolution
of the allocator:
- clarify a couple of expectations regarding what is meant to be achieved;
- update the header format;
- document `-fsanitize=scudo`.

Reviewers: alekseyshl, flowerhack

Reviewed By: alekseyshl

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321811 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add common CHECK prefix for tests without SSE/AVX codegen
Simon Pilgrim [Thu, 4 Jan 2018 18:23:46 +0000 (18:23 +0000)]
[X86] Add common CHECK prefix for tests without SSE/AVX codegen

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321810 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoTeach InlineCost about address spaces
Bjorn Pettersson [Thu, 4 Jan 2018 18:23:40 +0000 (18:23 +0000)]
Teach InlineCost about address spaces

Summary:
I basically copied this patch from here:
  https://reviews.llvm.org/D1251
But I skipped some of the refactoring to make the patch more clean.

The new outer3/inner3 test case in ptr-diff.ll triggers the
following assert without this patch:
lib/IR/Constants.cpp:1834: static llvm::Constant *llvm::ConstantExpr::getCompare(unsigned short, llvm::Constant *, llvm::Constant *, bool): Assertion `C1->getType() == C2->getType() && "Op types should be identical!"' failed.

The other new test cases makes sure that there is code coverage
for all modifications in InlineCost.cpp (getting different values
due to not fetching sizes for address space zero). I only guarantee
code coverage for those tests. The tests are not written in a way
that they would break if not having the corrections in
InlineCost.cpp. I found it quite hard to fine tune the tests into
getting different results based on the pointer sizes (except for
the test case where we hit an assert if not teaching InlineCost
about address spaces).

Reviewers: chandlerc, arsenm, haicheng

Reviewed By: arsenm

Subscribers: wdng, eraman, llvm-commits, haicheng

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321809 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRegenerate broadcast constant comment
Simon Pilgrim [Thu, 4 Jan 2018 18:21:33 +0000 (18:21 +0000)]
Regenerate broadcast constant comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321808 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Show missed combine for X/X for SDIV/UDIV and X%X for SREM/UREM
Simon Pilgrim [Thu, 4 Jan 2018 18:20:46 +0000 (18:20 +0000)]
[X86] Show missed combine for X/X for SDIV/UDIV and X%X for SREM/UREM

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321807 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoStructurizeCFG: xfail one of the testcases from r321751
Matt Arsenault [Thu, 4 Jan 2018 17:23:24 +0000 (17:23 +0000)]
StructurizeCFG: xfail one of the testcases from r321751

It fails with -verify-region-info. This seems to be a issue
with RegionInfo itself which existed before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321806 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAdd assertion on DT availability during LI update in UpdateAnalysisInformation
Anna Thomas [Thu, 4 Jan 2018 17:21:15 +0000 (17:21 +0000)]
Add assertion on DT availability during LI update in UpdateAnalysisInformation

This came up during discussions in llvm-commits for
rL321653: Check for unreachable preds before updating LI in
UpdateAnalysisInformation

The assert provides hints to passes to require both DT and LI if we plan on
updating LI through this function.

Tests run: make check

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321805 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Docs] Add Contributing page.
Florian Hahn [Thu, 4 Jan 2018 17:12:21 +0000 (17:12 +0000)]
[Docs] Add Contributing page.

This new page acts as an entry point for (new) contributors to LLVM and
provides information about

* What to contribute
* How to submit a patch
* Where to start to learn more about LLVM's architecture and internals.

This version of the page duplicates some information from the
DeveloperPolicy and Phabricator pages. Subsequent changes should work
towards moving information for new developers to this page, where it
makes sense.

Reviewers: reames, probinson, kristof.beyls, silvas, rengolin, asb

Reviewed By: silvas

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321804 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InstCombine] safely create a constant of the right type (PR35794)
Sanjay Patel [Thu, 4 Jan 2018 14:31:56 +0000 (14:31 +0000)]
[InstCombine] safely create a constant of the right type (PR35794)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321801 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ARM] Fix endianness of Thumb .inst.w directive
Oliver Stannard [Thu, 4 Jan 2018 13:56:40 +0000 (13:56 +0000)]
[ARM] Fix endianness of Thumb .inst.w directive

Wide Thumb2 instructions should be emitted into the object file as pairs of
16-bit words of the appropriate endianness, not one 32-bit word.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321799 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Hexagon] Replace INSERTRP/EXTRACTRP with INSERT/EXTRACT in HexagonISD
Krzysztof Parzyszek [Thu, 4 Jan 2018 13:56:04 +0000 (13:56 +0000)]
[Hexagon] Replace INSERTRP/EXTRACTRP with INSERT/EXTRACT in HexagonISD

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321798 91177308-0d34-0410-b5e6-96231b3b80d8