1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
Commit Graph

192420 Commits

Author SHA1 Message Date
David Tenty
94bdd8542e [AIX] Improve 32/64-bit build configuration
Summary:
AIX supports both 32-bit and 64-bit environments (with 32-bit being the default). This patch improves support for building LLVM on AIX in both 32-bit and 64-bit mode.

  - Change host detection to return correct 32/64-bit triple as config_guess does not return the correct version on 64-bit. This can confuse JIT tests and other things that care about what the host triple is.
  - Remove manual setting of 64-bit flags on AIX. AIX provides OBJECT_MODE environment variable to enable the user to obtain a 64-bit development environment. CMake will properly set these flags provided the user sets the correct OBJECT_MODE before configuring and setting them manually will interfere with 32-bit builds.
  - Don't present the LLVM_BUILD_32_BITS option on AIX, users should use OBJECT_MODE when running CMake instead.

Reviewers: hubert.reinterpretcast, DiggerLin, stevewan

Reviewed By: DiggerLin, stevewan

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74256
2020-02-20 15:41:00 -05:00
Craig Topper
c62fbc0139 Recommit "[X86] Replace a bad use of MVT::getVectorVT with EVT::getVectorVT""
With the correct author this time
2020-02-20 12:28:54 -08:00
Craig Topper
c55a492217 Revert 714265dabb606bfef2f85694234f152edbfa91ac "[X86] Replace a bad use of MVT::getVectorVT with EVT::getVectorVT"
I accidentally messed up the author on the previous commit somehow.
2020-02-20 12:28:33 -08:00
Quentin Colombet
040440d537 [X86] Replace a bad use of MVT::getVectorVT with EVT::getVectorVT
The type here isn't guaranteed to be a simple type.

Fixes PR44976
2020-02-20 12:25:37 -08:00
Nico Weber
d35d5f2e63 Revert "[AArch64][SVE] Add intrinsics for SVE2 bitwise ternary operations"
This reverts commit ce70e2899879e092b153a4078b993833b6696713.
It broke MC/AArch64/SVE2/bsl-diagnostics.s everywhere.
2020-02-20 15:11:13 -05:00
Sanjay Patel
1dc06667d0 [ConstantFold] add/move tests for FP with undef operand; NFC 2020-02-20 15:07:11 -05:00
Sourabh Singh Tomar
b4f51213cf Revert "[NFCI][DebugInfo]: Corrected a Typo."
This reverts commit 3e1090922a0b808f424ff424b744752b0d53a3ee
as per Paul Robinson's suggestion.
2020-02-21 01:15:09 +05:30
Francesco Petrogalli
b7293ff05c [llvm][build] Fix shared lib builds. [NFC]
The code at https://reviews.llvm.org/D74808 has broken builds that are
configured with -DBUILD_SHARED_LIBS=On.

This patch adds the correct library dependencies.
2020-02-20 19:42:53 +00:00
Quentin Colombet
b8760a31e4 [GISel][KnownBits] Give up on PHI analysis as soon as we don't know anything
When analyzing PHIs, we gather the known bits for every operand and
merge them together to get the known bits of the result of the PHI.
It is not unusual that merging the information leads to know nothing
on the result (e.g., phi a: i8 3, b: i8 unknown, ..., after looking at the
second argument we know we will know nothing on the result), thus, as
soon as we reach that state, stop analyzing the following operand (i.e.,
on the previous example, we won't process anything after looking at `b`).

This improves compile time in particular with PHIs with a large number
of operands.

NFC.
2020-02-20 11:34:01 -08:00
David Tenty
dc211a8b72 [AIX] Pack BasicBlockBits
Summary:
D51664 introduces a new structure BasicBlockBits which it expects to be
packed a certain way. This change is very similar to D60164, and we apply the
same fix:

"On AIX, the canonical layout of bit-fields would cause
these ... to span four bytes. Applying the pack pragma for compilers that
employ the AIX canonical layout allows these ... to fit within the expected
two bytes. In the future, the pragma would also likely need to be applied when
building with Clang on AIX."

Reviewers: jasonliu, hubert.reinterpretcast, sfertile, xingxue

Reviewed By: sfertile

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74911
2020-02-20 14:28:48 -05:00
Simon Pilgrim
997562c67a [X86] Fix NSW/NUW typo in avg test (PR44973)
The not_avg_v16i8_wide_constants test shouldn't assume NSW/NUW for the addition of -1 - copy + paste typo from other avg tests
2020-02-20 19:22:37 +00:00
Lang Hames
14da40b10d [ORC] Add a convenience method for setting the ExecutionSession to LLJITBuilder.
Can be used to set a custom pre-configured ExecutionSession for the LLJIT or
LLLazyJIT instance being constructed.
2020-02-20 11:15:08 -08:00
Lang Hames
871e8efa78 [ORC][examples] Fix ThinLtoJIT example after changes in 85fb997659b. 2020-02-20 11:15:08 -08:00
Sanjay Patel
8d3b95bafd [x86] allow peeking through an extract_subvector to find a splatted operand
The motivating case is seen in "splat4_v8f32_load_store" and based on code in PR42024:
https://bugs.llvm.org/show_bug.cgi?id=42024
(I haven't stepped through the v8i32 sibling test yet to see why that diverged.)

There are other potential improvements visible like allowing scalarization or vector
narrowing.

Differential Revision: https://reviews.llvm.org/D74909
2020-02-20 13:59:59 -05:00
Sean Fertile
e054548325 [PowerPC][NFC] Cleanup some of the Darwin mentions in the README.txt. 2020-02-20 13:57:13 -05:00
Francis Visoiu Mistrih
e96a7a4c4c Revert "[macho][NFC] Extract all CPU_(SUB_)TYPE logic to libObject"
This reverts commit 726c342ce27ada28efe90cb04ffb69c75065710a.

This breaks the windows bots with linker errors.
2020-02-20 10:51:25 -08:00
Francis Visoiu Mistrih
13b4fc1781 [macho][NFC] Extract all CPU_(SUB_)TYPE logic to libObject
This moves all the logic of converting LLVM Triples to
MachO::CPU_(SUB_)TYPE from the specific target (Target)AsmBackend to
more convenient functions in libObject.

This also gets rid of the separate two X86AsmBackend classes.

Differential Revision: https://reviews.llvm.org/D74808
2020-02-20 10:28:07 -08:00
Simon Pilgrim
61ba4efa56 [DAGCombiner] Use SDValue::getConstantOperandAPInt helper where possible. NFC. 2020-02-20 18:23:05 +00:00
Craig Topper
817b15d7ab [X86] Fix a -Wparentheses warning. NFC 2020-02-20 09:32:03 -08:00
Craig Topper
e08fad5a77 [X86] Rewrite LowerBRCOND to remove dead code and handle ISD::SETCC and overflow ops directly.
There's a lot of old leftover code in LowerBRCOND. Especially
the detecting or AND or OR of X86ISD::SETCC nodes. Those were
needed before LegalizeDAG was changed to visit nodes before
their operands.

It also relied on reversing the output of LowerSETCC to find the
flags producing node to use for the X86ISD::BRCOND node.

Rather than using LowerSETCC this patch uses emitFlagsForSetcc to
handle the integer ISD::SETCC case. This gives the flag producer
and the comparison code to use directly. I've removed the addTest
flag and just produce a X86ISD::BRCOND and return immediately.

Floating point ISD::SETCC case is just an X86ISD::FCMP with special
care for OEQ and UNE derived from the previous code. I've left
f128 out so it will emit a test. And LowerSETCC will be called
later to produce a libcall and X86ISD::SETCC. We have combines
that can merge the test and X86ISD::SETCC.

We need to handle two cases for overflow ops. Either they are used
directly or they have a seteq 0 or setne 1 to invert the overflow.
The old code did not handle the setne 1 case, but I think some
other combines were making up for it.

If we fail to find a condition, we'll wrap an AND with 1 on the
original condition and tell emitFlagsForSetcc to emit a compare
with 0. This will pickup the LowerAndToBT and or the EmitTest case.
I kept the isTruncWithZeroHighBitsInput call, but we might be able
to fold that in to emitFlagsForSetcc.

Differential Revision: https://reviews.llvm.org/D74750
2020-02-20 08:50:18 -08:00
Craig Topper
8c6da7f0b6 [AArch64] Move isOverflowIntrOpRes help function to the ISD namespace in SelectionDAG.h. NFC
Enables sharing with an upcoming X86 change.
2020-02-20 08:50:17 -08:00
Sanjay Patel
208855c4bd [x86] add vector tests for splatted memory ops; NFC
These correspond to patterns seen in PR42024:
https://bugs.llvm.org/show_bug.cgi?id=42024
2020-02-20 11:35:05 -05:00
Danilo Carvalho Grael
8bc53af309 [AArch64][SVE] Add intrinsics for SVE2 bitwise ternary operations
Summary:
Add intrinsics for the following operations:
- eor3, bcax
- bsl, bsl1n, bsl2n, nbsl

Reviewers: kmclaughlin, c-rhodes, sdesmalen, efriedma, rengolin

Reviewed By: efriedma

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74785
2020-02-20 11:36:48 -05:00
Craig Topper
941f4562bb [X86] Add DAG combines to form CVTPH2PS/CVTPS2PH from vXf16->vXf32/vXf64 fp_extends and vXf32->vXf16 fp_round.
Only handle power of 2 element count for simplicity. Not sure what to do with vXf64->vXf16 fp_round to avoid double rounding

Differential Revision: https://reviews.llvm.org/D74886
2020-02-20 08:26:17 -08:00
Simon Pilgrim
ac3ec9a0c4 [DAGCombine] visitEXTRACT_VECTOR_ELT - add SimplifyDemandedBits multi use support
Similar to what we already do with SimplifyDemandedVectorElts, call SimplifyDemandedBits across all the extracted elements of the source vector, treating it as single use.

There's a minor regression in store-weird-sizes.ll which will be addressed in an upcoming SimplifyDemandedBits patch.
2020-02-20 15:49:38 +00:00
Hans Wennborg
e1296518ec Add #include <condition_variable> to fix build after 85fb997659b5
See https://reviews.llvm.org/D74300#1884614
2020-02-20 16:36:19 +01:00
Sanjay Patel
1d1faa0ca2 [x86] regenerate test checks with less shuffle scrubbing; NFC
For shuffles with memory operands, we generally don't want to
hide the asm because we want to verify that the address offsets
are as expected.
2020-02-20 10:34:04 -05:00
Sean Fertile
f65ec1bb1c [PowerPC][NFC] We do not save/restore vrsave for any remaining subtargets.
Extend lit test to show that we don't save or restore vrsave register
when expanding @llvm.eh.unwind.init().
2020-02-20 10:20:33 -05:00
Sam Parker
a24415143b [NFC][RDA] Break-up initialization code
Separate out the initialization code from the loop traversal so
that the analysis can be reset and re-run by a user.
2020-02-20 14:59:42 +00:00
Matt Arsenault
5763ad793e AMDGPU: Fix v2i64<->v4f32 bitcast
I'm not sure how to test the v2i64->v4f32 case since I can't think of
any v2i64 cases that won't legalize to v4i32.
2020-02-20 09:49:09 -05:00
Sanjay Patel
6cb1ff7fe4 [Utils][x86] add an option to reduce scrubbing of shuffles with memops
I was drafting a patch that would increase broadcast load usage,
but our shuffle scrubbing makes it impossible to see if the memory
operand offset was getting created correctly. I'm proposing to make
that an option (defaulted to 'off' for now to reduce regression
test churn).

The updated files provide examples of tests where we can now verify
that the pointer offset for a loaded memory operand is correct. We
still have stack and constant scrubbing that can obscure the operand
even if we don't scrub the entire instruction.

Differential Revision: https://reviews.llvm.org/D74775
2020-02-20 09:33:05 -05:00
Sebastian Neubauer
8b6d8bc210 [AMDGPU] Don’t marke the .note section as ALLOC
Marking a section as ALLOC tells the ELF loader to load the section into memory.
As we do not want to load the notes into VRAM, the flag should not be there.

Differential Revision: https://reviews.llvm.org/D74600
2020-02-20 15:14:48 +01:00
Simon Pilgrim
8741b93e56 Regenerate rotate test. NFC. 2020-02-20 13:54:43 +00:00
Djordje Todorovic
e67d8322ba Revert "Reland "[DebugInfo] Enable the debug entry values feature by default""
This reverts commit rGfaff707db82d.
A failure found on an ARM 2-stage buildbot.
The investigation is needed.
2020-02-20 14:41:39 +01:00
Andrzej Warzynski
ccc0dc6d63 [AArch64][SVE] Re-arrange definitions in AArch64SVEInstrInfo.td (NFC)
Re-arrange definitions related to loads and stores so that they are
grouped together.

This patch implements only non-functional changes.
2020-02-20 12:41:16 +00:00
Simon Pilgrim
84096bbb77 [AMDGPU] simplifyI24 - replace GetDemandedBits with SimplifyMultipleUseDemandedBits
GetDemandedBits mostly just calls SimplifyMultipleUseDemandedBits now, but it does a very blunt constant simplification that SimplifyMultipleUseDemandedBits avoids.

If we need to demand bits from constants we should handle this through ShrinkDemandedConstant/targetShrinkDemandedConstant.

@arsenm confirmed that the sign extended immediates are better for code size.

Differential Revision: https://reviews.llvm.org/D74857
2020-02-20 12:03:08 +00:00
dfukalov
e81c6d4c67 SpeculativeExecution: fixed ingoring free execution
Summary:
After updating cost model in AMDGPU target (47a5c36b37f0) the pass started to
ignore some BBs since they got all instructions estimated as free.

Reviewers: arsenm, chandlerc, nhaehnle

Reviewed By: nhaehnle

Subscribers: jvesely, wdng, nhaehnle, tpr, hiraditya, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74825
2020-02-20 14:45:02 +03:00
Mikhail Maltsev
29b9c00369 [ARM,MVE] Add vqdmull[b,t]q intrinsic families
Summary:
This patch adds two families of ACLE intrinsics: vqdmullbq and
vqdmulltq (including vector-vector and vector-scalar variants) and the
corresponding LLVM IR intrinsics llvm.arm.mve.vqdmull and
llvm.arm.mve.vqdmull.predicated.

Reviewers: simon_tatham, MarkMurrayARM, dmgreen, ostannard

Reviewed By: MarkMurrayARM

Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D74845
2020-02-20 10:51:19 +00:00
serge-sans-paille
c4fa124875 [NFC] Remove ar/ranlib test noise during cmake step
At least on RHEL, ar outputs on stderr a message similar to

        .../bin/ar: creating t.a

Which creates noise during the cmake step. Get rid of it.
2020-02-20 11:26:26 +01:00
Johannes Doerfert
8fcd2f1bf2 [Attributor] Make sure abstract attributes are properly initialized 2020-02-20 02:46:40 -06:00
Johannes Doerfert
dec8fd7748 [Attributor][NFC] Refactor interface 2020-02-20 02:46:40 -06:00
Johannes Doerfert
2d214fefe5 [Attributor][NFC] Prepare some tests to be used with update test script 2020-02-20 02:44:05 -06:00
serge-sans-paille
cbe51c16a5 Fix compiler extension in standalone mode
Use a dedicated cmake file to store the extension configured within LLVM. That
way, a standalone build of clang can load this cmake file and get all the
configured standalone extensions.

This patch is related to https://reviews.llvm.org/D74602

Differential Revision: https://reviews.llvm.org/D74757
2020-02-20 07:19:04 +01:00
Hideto Ueno
26e1302f3c [MustExecute] Add backward exploration for must-be-executed-context
Summary:
As mentioned in D71974, it is useful for must-be-executed-context to explore CFG backwardly.
This patch is ported from parts of D64975. We use a dominator tree to find the previous context if
a dominator tree is available.

Reviewers: jdoerfert, hfinkel, baziotis, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74817
2020-02-20 14:49:30 +09:00
Johannes Doerfert
735b538753 [Attributor][NFC] Improve the debug output & add a TODO 2020-02-19 23:46:08 -06:00
Johannes Doerfert
2fca20aa6c [Attributor][NFC] Add more memory_location tests 2020-02-19 23:46:08 -06:00
Johannes Doerfert
e7cf000a53 [Attributor] Use existing returned information better
We can look through calls with `returned` argument attributes when we
collect subsuming positions. This allows us to get existing attributes
from more places.
2020-02-19 23:46:07 -06:00
Johannes Doerfert
2d3bc0f805 [Attributor][FIX] Avoid setting wrong load/store alignments 2020-02-19 23:46:07 -06:00
Matt Arsenault
3e62f38540 TableGen: Fix logic for default operands
This was checking for default operands in the current DAG instruction,
rather than the correct result operand list. I'm not entirly sure how
this managed to work before, but was failing for me when multiple
default operands were overridden.
2020-02-19 23:41:07 -05:00
Johannes Doerfert
c91da0566b [Attributor] Generalize getAssumedConstantInt interface
We are often interested in an assumed constant and sometimes it has to
be an integer constant. Before we only looked for the latter, now we can
ask for either.
2020-02-19 22:33:51 -06:00