| Commit message (Collapse) | Author | Age | Files | Lines | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
- Fix spill/reloads of XSeqPairs failing with vregs (only physregs
  worked correctly)
- Add missing spill/reload code for WSeqPairs class
Differential Revision: https://reviews.llvm.org/D52761
llvm-svn: 343799
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Summary: This patch matches signed dot4 and dot8 pattern.
Author: FarhanaAleen
Reviewed By: msearles
Differential Revision: https://reviews.llvm.org/D52520
llvm-svn: 343798
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
This is a follow-up to rL343482 / D52439.
This was a pattern that initially caused the commit to be reverted because
the transform requires a bitcast as shown here.
llvm-svn: 343794
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
lowerGlobalAddress, lowerBlockAddress, and insertIndirectBranch contain 
overzealous checks for is64Bit. These functions are all safe as-implemented 
for RV64.
llvm-svn: 343781
 | 
| | 
| 
| 
| 
| 
| 
|  | 
When scalarizing a load, be sure to update the offset in the
MachineMemOperand for each scalar load.
llvm-svn: 343776
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
Replacing Timer* with unique_ptr<Timer> in a pass-to-timer map.
That allows to get rid of unpretty raw deletes in PassTimingInfo destructor.
Strictly cleanup, not intended to change any visible behavior.
llvm-svn: 343772
 | 
| | 
| 
| 
|  | 
llvm-svn: 343765
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
f32 values passed on the stack would previously cause an assertion in 
unpackFromMemLoc.. This would only trigger in the presence of the F extension 
making f32 a legal type. Otherwise the f32 would be legalized.
This patch fixes that by keeping LocVT=f32 when a float is passed on the 
stack. It also adds test coverage for this case, and tests that also 
demonstrate lw/sw/flw/fsw will be selected when most profitable. i.e. there is 
no unnecessary i32<->f32 conversion in registers.
llvm-svn: 343756
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
combineANDXORWithAllOnesIntoANDNP. NFCI
It's the only caller and the logic pretty easy to combine.
llvm-svn: 343754
 | 
| | 
| 
| 
| 
| 
| 
|  | 
Rename to lowerRETURNADDR, lowerFRAMEADDR in order to be consistent with the 
LLVM coding style and the other functions in this file.
llvm-svn: 343752
 | 
| | 
| 
| 
|  | 
llvm-svn: 343750
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
r343712 performed this optimisation during instruction selection. As Eli 
Friedman pointed out in post-commit review, implementing this as a DAGCombine 
might allow opportunities for further optimisations.
llvm-svn: 343741
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Summary: Depends on D52755.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D52805
llvm-svn: 343739
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
There was some duplicated logic for using the LocInfo of a CCValAssign in 
order to convert from the ValVT to LocVT or vice versa. Resolve this by 
factoring out convertLocVTFromValVT from unpackFromRegLoc. Also rename 
packIntoRegLoc to the more appropriate convertValVTToLocVT and call these 
helper functions consistently.
llvm-svn: 343737
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
MCContext does not destroy MCSymbols on shutdown. So, rather than putting
SmallVectors (which may heap-allocate) inside MCSymbolWasm, use unowned pointer
to a WasmSignature instead. The signatures are now owned by the AsmPrinter.
Also uses WasmSignature instead of param and result vectors in TargetStreamer,
and leaves some TODOs for further simplification.
 Differential Revision: https://reviews.llvm.org/D52580
llvm-svn: 343733
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
If present, PHI nodes must appear before non-PHI nodes in a basic block. The
register allocator relies on this and will fail to eliminate PHI's that do not
meet this requirement.
llvm-svn: 343731
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
We're a long way from D50992 and D51553, but this is where we have to start.
We weren't back-propagating undefs into binop constant values for anything but
add/sub/mul/and/or/xor. 
This is likely because we have to be careful about not introducing UB/poison 
with div/rem/shift. But I suspect we already are getting the poison part wrong 
for add/sub/mul (although it may not be possible to expose the bug currently
because we use SimplifyDemandedVectorElts from a limited set of opcodes).
See the discussion/implementation from D48987 and D49047.
This patch just enables functionality for FP ops because those do not have 
UB/poison potential.
llvm-svn: 343727
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Summary:
Reviewers: kristina, zhmu, dschuff, rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52680
llvm-svn: 343724
 | 
| | 
| 
| 
| 
| 
|  | 
The additional patterns needed for this aren't overwhelming and introducing extra bitcasts during lowering limits our ability to do computeNumSignBits. Not that I have a good example of that for select. I'm just becoming increasingly grumpy about promotion of AND/OR/XOR. SELECT was just a lot easier to fix.
llvm-svn: 343723
 | 
| | 
| 
| 
| 
| 
|  | 
v2i1/v4i1 SELECT into v8i1.
llvm-svn: 343713
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
instruction selection
Although we can't write a tablegen pattern to remove redundant 
splitf64+buildf64 pairs due to the multiple return values, we can handle it 
with some C++ selection code. This is simpler than removing them after 
instruction selection through RISCVDAGToDAGISel::PostprocessISelDAG, as was 
done previously.
llvm-svn: 343712
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
AVX512VL is enabled.
This allows the phi nodes to be generated with the correct register class when expanded.
llvm-svn: 343710
 | 
| | 
| 
| 
| 
| 
|  | 
The register class is all that's important for the pseudo instructions. We can use patterns to handle the different types.
llvm-svn: 343709
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
addresses
This patch adds a 'WriteCopy' [WriteLoad, WriteStore] schedule sequence instead to better model the behaviour
Found by @andreadb during llvm-mca testing on btver2 which was crashing on "zero uop" WriteRMW only instructions
llvm-svn: 343708
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Summary:
Ensure the TemplateParam attribute of the DIGlobalVariable node is translated into the proper DIEs.
Resolves https://bugs.llvm.org/show_bug.cgi?id=22119
Reviewers: dblaikie, probinson, aprantl, JDevlieghere, clayborg, whitequark, deadalnix
Reviewed By: dblaikie
Subscribers: llvm-commits
Tags: #debug-info
Differential Revision: https://reviews.llvm.org/D52057
llvm-svn: 343706
 | 
| | 
| 
| 
| 
| 
|  | 
These were being tagged as <WriteALULd, WriteRMW> instead of properly using the RMW sequence
llvm-svn: 343705
 | 
| | 
| 
| 
| 
| 
|  | 
Match AMD Fam16h SOG + llvm-exegesis tests
llvm-svn: 343701
 | 
| | 
| 
| 
|  | 
llvm-svn: 343700
 | 
| | 
| 
| 
|  | 
llvm-svn: 343697
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
overridable for EXPENSIVE_CHECKS
-verify-machineinstrs was implemented as a simple bool. As a result, the
'VerifyMachineCode == cl::BOU_UNSET' used by EXPENSIVE_CHECKS to make it on by
default but possible to disable didn't work as intended. Changed
-verify-machineinstrs to a boolOrDefault to correct this.
llvm-svn: 343696
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
1. Fix include ordering.
2. Improve variable name (width is bitwidth not number-of-elements).
3. Add local Opcode variable to reduce code duplication.
llvm-svn: 343694
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
This fixes a problem where the register allocator fails to eliminate a PHI
because there's a non-PHI in the middle of the PHI instructions at the start
of a BB.
This G_TRUNC can be better placed but this at least fixes the correctness issue
quickly. I'll follow up with a patch to the verifier to catch this kind of bug
in future.
llvm-svn: 343693
 | 
| | 
| 
| 
| 
| 
| 
|  | 
This function will deal with more than shuffles with D50992, and I 
have another potential per-element fold that could live here.
llvm-svn: 343692
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Fix use of SSE1 registers for f32 ops in no-x87 mode.
Notably, allow use of SSE instructions for f32 operations in 64-bit
mode (but not 32-bit which is disallowed by callign convention).
Also avoid translating memset/memcopy/memmove into SSE registers
without X87 for 32-bit mode.
This fixes PR38738.
Reviewers: nickdesaulniers, craig.topper
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D52555
llvm-svn: 343689
 | 
| | 
| 
| 
| 
| 
|  | 
Introduce and use a switch on the opcode.
llvm-svn: 343688
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
This patch makes sure that a register is only hinted once to RA. In extreme
cases the same register can otherwise be hinted numerous times and cause a
compile time slowdown.
Review: Simon Pilgrim
https://reviews.llvm.org/D52826
llvm-svn: 343686
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
The patterns as defined are correct only when XLen==32.
This is another preparatory patch for a set of patches that flesh out RV64 
codegen.
llvm-svn: 343679
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
1. brcond operates on an condition.
2. atomic_fence and the pseudo AMO instructions should all take xlen immediates 
This allows the same definitions and patterns to work for RV64 (XLenVT==i64).
llvm-svn: 343678
 | 
| | 
| 
| 
| 
| 
|  | 
These patterns are not correct for RV64.
llvm-svn: 343677
 | 
| | 
| 
| 
|  | 
llvm-svn: 343676
 | 
| | 
| 
| 
|  | 
llvm-svn: 343674
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Summary:
The new buffer/tbuffer intrinsics handle an out-of-range immediate
offset by moving/adding offset&-4096 to a vgpr, leaving an in-range
immediate offset, with a chance of the move/add being CSEd for similar
loads/stores.
However it turns out that a negative offset in a vgpr is illegal, even
if adding the immediate offset makes it legal again.
Therefore, this commit disables the offset&-4096 thing if the offset is
negative.
Differential Revision: https://reviews.llvm.org/D52683
Change-Id: Ie02f0a74f240a138dc2a29d17cfbd9e350e4ed13
llvm-svn: 343672
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
Remove uop on WriteRMW and move it into the few instructions that need it.
Match AMD Fam16h SOG + llvm-exegesis tests
llvm-svn: 343671
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
I was expecting this to be a nfc but Silvermont seems to be setup a little differently:
// A folded store needs a cycle on MEC_RSV for the store data, but it does not need an extra port cycle to recompute the address.
def : WriteRes<WriteRMW, [SLM_MEC_RSV]>;
So moving from WriteStore to WriteRMW reduces predicted port pressure, confirmed by @craig.topper that this is correct.
Differential Revision: https://reviews.llvm.org/D52740
llvm-svn: 343670
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
Differential Revision: https://reviews.llvm.org/D52704
Reviewers: sebpop, tejohnson, brzycki, SirishP
Reviewed By: sebpop
llvm-svn: 343663
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Modified the testcases to use both pass managers
Use single commandline flag for both pass managers.
Differential Revision: https://reviews.llvm.org/D52708
Reviewers: sebpop, tejohnson, brzycki, SirishP
Reviewed By: tejohnson, brzycki
llvm-svn: 343662
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
Summary: The AMDGPU target specific pass "isel" is a misleading name.
Reviewers: tstellar, echristo, javed.absar, arsenm
Reviewed By: arsenm
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D52759
llvm-svn: 343659
 | 
| | 
| 
| 
| 
| 
| 
|  | 
Even if calls are enabled, it still needs to be run
for forcing inline of functions that use LDS.
llvm-svn: 343657
 | 
| | 
| 
| 
|  | 
llvm-svn: 343656
 | 
| | 
| 
| 
|  | 
llvm-svn: 343655
 |