summaryrefslogtreecommitdiff
path: root/llvm
AgeCommit message (Collapse)Author
2018-10-02[AArch64][v8.5A] Add Memory Tagging instructionsOliver Stannard
This adds new instructions to manipluate tagged pointers, and to load and store the tags associated with memory. Patch by Pablo Barrio, David Spickett and Oliver Stannard! Differential revision: https://reviews.llvm.org/D52490
2018-10-02[AArch64][v8.5A] Add Memory Tagging system registersOliver Stannard
This adds new system registers introduced by the Memory Tagging extension. Patch by Pablo Barrio! Differential revision: https://reviews.llvm.org/D52488
2018-10-02[AArch64][v8.5A] Add MTE system instructionsOliver Stannard
The Memory Tagging Extension adds system instructions for data cache maintenance, implemented as new operands to the DC instruction. Patch by Pablo Barrio! Differential revision: https://reviews.llvm.org/D52487
2018-10-02[InstCombine] Fold ~A - Min/Max(~A, O) -> Max/Min(A, ~O) - ADavid Green
This is an attempt to get out of a local-minimum that instcombine currently gets stuck in. We essentially combine two optimisations at once, ~a - ~b = b-a and min(~a, ~b) = ~max(a, b), only doing the transform if the result is at least neutral. This involves using IsFreeToInvert, which has been expanded a little to include selects that can be easily inverted. This is trying to fix PR35875, using the ideas from Sanjay. It is a large improvement to one of our rgb to cmy kernels. Differential Revision: https://reviews.llvm.org/D52177
2018-10-02[AArch64][v8.5A] Add MTE as an optional AArch64 extensionOliver Stannard
This adds the memory tagging extension, which is an optional extension introduced in v8.5A. The new instructions and registers will be added by subsequent patches. Patch by Pablo Barrio! Differential revision: https://reviews.llvm.org/D52486
2018-10-02[X86] Standardize floating point assembly commentsSimon Pilgrim
Consistently try to use APFloat::toString for floating point constant comments to get rid of differences between Constant / ConstantDataSequential values - it should help stop some of the linux-windows buildbot failures matching NaN/INF etc. as well. Differential Revision: https://reviews.llvm.org/D52702
2018-10-02[InstCombine] Tests for ~A - Min/Max(~A, O) -> Max/Min(A, ~O) - A. NFCDavid Green
2018-10-02AMDGPU: Expand atomicrmw nand in IRMatt Arsenault
2018-10-02[WebAssembly] Restore slashes in SIMD conversion namesThomas Lively
Summary: Depends on D52372 and D52442. Reviewers: aheejin, dschuff, aardappel Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D52512
2018-10-02[MCA] Remove SM.hasNext() call in FetchStage::execute.Owen Rodley
Summary: This is redundant, as FetchStage::getNextInstruction already checks this and returns llvm::ErrorSuccess() as appropriate. NFC. Reviewers: andreadb Subscribers: gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D52642
2018-10-02[AArch64][DAGCombiner]: change -stop-after=isel to instruction-selectFangrui Song
"isel" is registered by AMDGPU. The test will break if the AMDGPU target is not built.
2018-10-01[SimplifyCFG] Use Value::hasNUses instead of 'getNumUses() =='. NFCICraig Topper
getNumUses is linear in the number of uses. Since we're looking for a specific use count, we can use hasNUses which will stop as soon as it determines there are more than N uses instead of walking all of them.
2018-10-01[llvm-mca] Rename the 'Subtract' method to 'subtract'Matt Davis
2018-10-01[SimplifyCFG] Update comments that refer to CondBB to say ThenBB instead. NFCCraig Topper
There is no variable in this function named CondBB, but there is one named ThenBB and I believe the comments are all refering to it.
2018-10-01[PDB] Add support for more kinds of PDB Sym Tags.Zachary Turner
DIA SDK is returning several new sym tag types, so we update the enumeration and printing code to support these.
2018-10-01Revert: r343521 and r343541: [globalisel] Add a combiner helpers for ↵Daniel Sanders
extending loads and use them in a pre-legalize combiner for AArch64 There's a strange assertion on two of the Green Dragon bots that goes away when this is reverted. The assertion is in RegBankAlloc and if it is this commit then -verify-machine-instrs should have caught it earlier in the pipeline.
2018-10-01[codeview] Simplify S_DEFRANGE emission code, NFCReid Kleckner
These assembler directives are still pretty unreadable and it would be nice to clean them up at some point.
2018-10-01[codeview] Emit S_FRAMEPROC and use S_DEFRANGE_FRAMEPOINTER_RELReid Kleckner
Summary: Before this change, LLVM would always describe locals on the stack as being relative to some specific register, RSP, ESP, EBP, ESI, etc. Variables in stack memory are pretty common, so there is a special S_DEFRANGE_FRAMEPOINTER_REL symbol for them. This change uses it to reduce the size of our debug info. On top of the size savings, there are cases on 32-bit x86 where local variables are addressed from ESP, but ESP changes across the function. Unlike in DWARF, there is no FPO data to describe the stack adjustments made to push arguments onto the stack and pop them off after the call, which makes it hard for the debugger to find the local variables in frames further up the stack. To handle this, CodeView has a special VFRAME register, which corresponds to the $T0 variable set by our FPO data in 32-bit. Offsets to local variables are instead relative to this value. This is part of PR38857. Reviewers: hans, zturner, javed.absar Subscribers: aprantl, hiraditya, JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D52217
2018-10-01Fix the Windows build in GlobalISelReid Kleckner
Clang-cl was complaining about some sort of constexpr narrowing bug: C:\src\llvm-project\llvm\lib\CodeGen\GlobalISel\CombinerHelper.cpp(136,31): error: non-constant-expression cannot be narrowed from type 'llvm::TargetOpcode::(anonymous enum at C:\src\llvm-project\llvm\include\llvm/CodeGen/TargetOpcodes.h:22:1)' to 'unsigned int' in initializer list [-Wc++11-narrowing] unsigned(MI.getOpcode()) == unsigned(TargetOpcode::G_LOAD) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\src\llvm-project\llvm\lib\CodeGen\GlobalISel\CombinerHelper.cpp(136,31): note: insert an explicit cast to silence this issue unsigned(MI.getOpcode()) == unsigned(TargetOpcode::G_LOAD) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static_cast<unsigned int>(
2018-10-01Recommit r343499 "[X86] Enable load folding in the test shrinking code"Craig Topper
Original message: This patch adds load folding support to the test shrinking code. This was noticed missing in the review for D52669
2018-10-01Recommit r343498 "[X86] Improve test instruction shrinking when the sign ↵Craig Topper
flag is used and the output of the and is truncated." This includes a fix to prevent i16 compares with i32/i64 ands from being shrunk if bit 15 of the and is set and the sign bit is used. Original commit message: Currently we skip looking through truncates if the sign flag is used. But that's overly restrictive. It's safe to look through the truncate as long as we ensure one of the 3 things when we shrink. Either the MSB of the mask at the shrunken size isn't set. If the mask bit is set then either the shrunk size needs to be equal to the compare size or the sign There are still missed opportunities to shrink a load and fold it in here. This will be fixed in a future patch.
2018-10-01[InstCombine] add inverse test for vector trunc canonical form; NFCSanjay Patel
2018-10-01[InstCombine] regenerate test checks; NFCSanjay Patel
These files used an old version of the script. We regex more now.
2018-10-01[PowerPC] Folding XForm to DForm loads requires alignment for some DForm loads.Stefan Pintilie
Going from XForm Load to DSForm Load requires that the immediate be 4 byte aligned. If we are not aligned we must leave the load as LDX (XForm). This bug is causing a compile-time failure in the benchmark h264ref. Differential Revision: https://reviews.llvm.org/D51988
2018-10-01Temporarily revert "[GVNHoist] Re-enable GVNHoist by default"Eric Christopher
This reverts commit r342387 as it's showing significant performance regressions in a number of benchmarks. Followed up with the committer and original thread with an example and will get performance numbers before recommitting.
2018-10-01[globalisel] Add a combiner helpers for extending loads and use them in a ↵Daniel Sanders
pre-legalize combiner for AArch64 Summary: Depends on D45541 Reviewers: ab, aditya_nandakumar, bogner, rtereshin, volkan, rovka, javed.absar, aemerson Subscribers: aemerson, rengolin, mgorny, javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D45543
2018-10-01X86, AArch64, ARM: Do not attach debug location to spill/reload instructionsMatthias Braun
Spill/reload instructions are artificially generated by the compiler and have no relation to the original source code. So the best thing to do is not attach any debug location to them (instead of just taking the next debug location we find on following instructions). Differential Revision: https://reviews.llvm.org/D52125
2018-10-01[X86] Add more test shrinking with truncate and sign bit usage tests. NFCCraig Topper
2018-10-01Revert r343499 and r343498. X86 test improvementsCraig Topper
There's a subtle bug in the handling of truncate from i32/i64 to i32 without minsize. I'll be adding more test cases and trying to find a fix.
2018-10-01[Hexagon] Remove incorrect pattern for swizKrzysztof Parzyszek
The pattern had a couple of problems: - It was checking for loads of bytes in the reverse order to what it should have been looking for. - It would replace loads of bytes with a load of a word without making sure that the alignment was correct. Thanks to Eli Friedman for pointing it out.
2018-10-01[AMDGPU] Fixed SIInstrInfo::getOpSize to handle subregsStanislav Mekhanoshin
Currently it returns incorrect operand size for a target independet node such as COPY if operand is a register with subreg. Instead of correct subreg size it returns a size of the whole superreg. Differential Revision: https://reviews.llvm.org/D52736
2018-10-01[PDB] Add support for dumping Typedef records.Zachary Turner
These work a little differently because they are actually in the globals stream and are treated as symbol records, even though DIA presents them as types. So this also adds the necessary infrastructure to cache records that live somewhere other than the TPI stream as well.
2018-10-01[PDB] Add support for parsing VFTable Shape records.Zachary Turner
This allows them to be returned from the native API.
2018-10-01MIRParser: Check that instructions only reference DILocation metadataMatthias Braun
2018-10-01[WebAssembly] Fixed AsmParser not allowing instructions with /Wouter van Oortmerssen
Summary: The AsmParser Lexer regards these as a seperate token. Here we expand the instruction name with them if they are adjacent (no whitespace). Tested: the basic-assembly.s test case has one case with a / in it. The currently are also instructions with : in them, which we intend to rename rather than fix them here. Reviewers: tlively, dschuff Subscribers: sbc100, jgravelle-google, aheejin, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D52442
2018-10-01[X86] Enable load folding in the test shrinking codeCraig Topper
This patch adds load folding support to the test shrinking code. This was noticed missing in the review for D52669 Differential Revision: https://reviews.llvm.org/D52699
2018-10-01[X86] Improve test instruction shrinking when the sign flag is used and the ↵Craig Topper
output of the and is truncated Currently we skip looking through truncates if the sign flag is used. But that's overly restrictive. It's safe to look through the truncate as long as we ensure one of the 3 things when we shrink. Either the MSB of the mask at the shrunken size isn't set. If the mask bit is set then either the shrunk size needs to be equal to the compare size or the sign flag needs to be unused. There are still missed opportunities to shrink a load and fold it in here. This will be fixed in a future patch. Differential Revision: https://reviews.llvm.org/D52669
2018-10-01[X86][Btver2] Fix BT(C|R|S)mr & BT(C|R|S)mi schedule latency + uop countsSimon Pilgrim
Match AMD Fam16h SOG + llvm-exegesis tests
2018-10-01DAGCombiner: StoreMerging: Fix bad index calculating when adjusting ↵Matthias Braun
mismatching vector types This fixes a case of bad index calculation when merging mismatching vector types. This changes the existing code to just use the existing extract_{subvector|element} and a bitcast (instead of bitcast first and then newly created extract_xxx) so we don't need to adjust any indices in the first place. rdar://44584718 Differential Revision: https://reviews.llvm.org/D52681
2018-10-01[x86] add tests for 256- and 512-bit vector types for scalar-to-vector ↵Sanjay Patel
transform; NFC
2018-10-01[X86] Create schedule classes for BT(C|R|S)mi and BT(C|R|S)mr instructionsSimon Pilgrim
2018-10-01[AArch64] Refactor cheap cost modelEvandro Menezes
Refactor the order in `TII::isAsCheapAsAMove()` to ease future development and maintenance. Practically NFC.
2018-10-01[X86] Remove unnecessary BTmi/BTmr scheduler overridesSimon Pilgrim
2018-10-01[InstCombine] Handle vector compares in foldGEPIcmp(), take 2Jesper Antonsson
Summary: This is a continuation of the fix for PR34627 "InstCombine assertion at vector gep/icmp folding". (I just realized bugpoint had fuzzed the original test for me, so I had fixed another trigger of the same assert in adjacent code in InstCombine.) This patch avoids optimizing an icmp (to look only at the base pointers) when the resulting icmp would have a different type. The patch adds a testcase and also cleans up and shrinks the pre-existing test for the adjacent assert trigger. Reviewers: lebedev.ri, majnemer, spatel Reviewed By: lebedev.ri Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52494
2018-10-01[mips] Generate tests expectations using update_llc_test_checks. NFCSimon Atanasyan
Generate tests expectations using update_llc_test_checks and reduce number of "check prefixes" used in the tests.
2018-10-01[X86][Btver2] Fix BTmr schedule uop countsSimon Pilgrim
Match AMD Fam16h SOG + llvm-exegesis tests
2018-10-01[InstCombine] try to convert vector insert+extract to trunc; 2nd trySanjay Patel
This was originally committed at rL343407, but reverted at rL343458 because it crashed trying to handle a case where the destination type is FP. This version of the patch adds a check for that possibility. Tests added at rL343480. Original commit message: This transform is requested for the backend in: https://bugs.llvm.org/show_bug.cgi?id=39016 ...but I figured it was worth doing in IR too, and it's probably easier to implement here, so that's this patch. In the simplest case, we are just truncating a scalar value. If the extract index doesn't correspond to the LSBs of the scalar, then we have to shift-right before the truncate. Endian-ness makes this tricky, but hopefully the ASCII-art helps visualize the transform. Differential Revision: https://reviews.llvm.org/D52439
2018-10-01[InstCombine] add more insert-extract tests for D52439; NFCSanjay Patel
The first attempt at this transform: rL343407 ...was reverted: rL343458 ...because it did not handle the case where we bitcast to FP. The patch was already limited to avoid the case where we bitcast from FP, but we might want to transform that too.
2018-10-01[X86] Create schedule classes for BTmi and BTmr instructionsSimon Pilgrim
2018-10-01Move llvm util dependencies from clang-tools-extra to add_lit_target.Haojian Wu
Summary: Address fixme in r301762. And would simplify the cmake file in clang-tools-extra. Reviewers: sammccall Subscribers: mgorny, llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D52713