History log of /llvm-project/llvm/lib/CodeGen/MachineVerifier.cpp (Results 126 – 150 of 552)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-13.0.0-rc2
# af8e09d4 20-Aug-2021 Jessica Paquette <jpaquette@apple.com>

[GlobalISel] Add G_LLROUND

Basically the same as G_LROUND. Handles the llvm.llround family of intrinsics.

Also add a helper function to the MachineVerifier for checking if all of the
(virtual regis

[GlobalISel] Add G_LLROUND

Basically the same as G_LROUND. Handles the llvm.llround family of intrinsics.

Also add a helper function to the MachineVerifier for checking if all of the
(virtual register) operands of an instruction are scalars. Seems like a useful
thing to have.

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

show more ...


# 31189264 19-Aug-2021 Jessica Paquette <jpaquette@apple.com>

[GlobalISel] Add a G_LROUND instruction

Meant to represent the `@llvm.lround.*` family.

Add the opcode, docs, and verification.

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


# 95ac3d15 18-Aug-2021 Amara Emerson <amara@apple.com>

[AArch64][GlobalISel] Add G_VECREDUCE fewerElements support for full scalarization.

For some reductions like G_VECREDUCE_OR on AArch64, we need to scalarize
completely if the source is <= 64b. This

[AArch64][GlobalISel] Add G_VECREDUCE fewerElements support for full scalarization.

For some reductions like G_VECREDUCE_OR on AArch64, we need to scalarize
completely if the source is <= 64b. This change adds support for that in
the legalizer. If the source has a pow-2 num elements, then we can do
a tree reduction using the scalar operation in the individual elements.
Otherwise, we just create a sequential chain of operations.

For AArch64, we only need to scalarize if the input is <64b. If it's great than
64b then we can first do a fewElements step to 64b, taking advantage of vector
instructions until we reach the point of scalarization.

I also had to relax the verifier checks for reductions because the intrinsics
support <1 x EltTy> types, which we lower to scalars for GlobalISel.

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

show more ...


# 0a2b1ba3 17-Aug-2021 Jessica Paquette <jpaquette@apple.com>

[GlobalISel] Add G_ISNAN

Add a generic opcode equivalent to the `llvm.isnan` intrinsic +
MachineVerifier support for it.

We need an opcode here because we may want target-specific lowering later on

[GlobalISel] Add G_ISNAN

Add a generic opcode equivalent to the `llvm.isnan` intrinsic +
MachineVerifier support for it.

We need an opcode here because we may want target-specific lowering later on.

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

show more ...


# 92ce6db9 13-Aug-2021 Arthur Eubanks <aeubanks@google.com>

[NFC] Rename AttributeList::hasFnAttribute() -> hasFnAttr()

This is more consistent with similar methods.


Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init
# 4de74a7c 21-Jul-2021 Jon Roelofs <jonathan_roelofs@apple.com>

[MachineVerifier] Make INSERT_SUBREG diagnostic respect operand 2 subregs

This came out of post-commit review: https://reviews.llvm.org/D105953#inline-1012919

Thanks uabelho!


# be873832 14-Jul-2021 Jon Roelofs <jonathan_roelofs@apple.com>

[MachineVerifier] Diagnose invalid INSERT_SUBREGs

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


# 6c40abb6 16-Jul-2021 Jon Roelofs <jonathan_roelofs@apple.com>

Revert "[MachineVerifier] Diagnose invalid INSERT_SUBREGs"

This reverts commit dd57ba1a17b93dbe211d04cb2d4de5f6dc898d60.

It broke some tests: http://45.33.8.238/linux/51314/step_12.txt


# dd57ba1a 14-Jul-2021 Jon Roelofs <jonathan_roelofs@apple.com>

[MachineVerifier] Diagnose invalid INSERT_SUBREGs

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


# a6428724 30-Jun-2021 Jon Roelofs <jonathan_roelofs@apple.com>

[GISel] Support llvm.memcpy.inline

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


Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1
# cea97fc0 17-Apr-2021 Matt Arsenault <Matthew.Arsenault@amd.com>

GlobalISel: Relax verification of physical register copy types

This was picking a concrete size for a physical register, and
enforcing exact match on the virtual register's type size. Some
targets a

GlobalISel: Relax verification of physical register copy types

This was picking a concrete size for a physical register, and
enforcing exact match on the virtual register's type size. Some
targets add multiple types to a register class, and some are smaller
than the full bit width. For example x86 adds f32 to 128-bit xmm
registers, and AMDGPU adds i16/f16 to 32-bit registers.

It might be better to represent these cases as a copy of the full
register and an extraction of the subpart, but a lot of code assumes
you can directly copy. This will help fix the current usage of the DAG
calling convention infrastructure which is incompatible with how
GlobalISel is now using it.

The API is somewhat cumbersome here, but I just mirrored the existing
functions, except now with LLTs (and allow returning null on failure,
unlike the MVT version). I think the concept of selecting register
classes based on type is flawed to begin with, but I'm trying to keep
this compatible with the existing handling.

show more ...


# b6db6f55 21-Apr-2021 Hongtao Yu <hoy@fb.com>

[CSSPGO] Exclude pseudo probe from slotindex verification.


Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5
# 8fbe04f4 31-Mar-2021 Matt Arsenault <Matthew.Arsenault@amd.com>

MachineVerifier: Continue reporting errors for copies

This was skipping verification of later copies, but generally the
verifier tries to report as many things wrong as possible in the
function.


# 61d22f2e 13-Apr-2021 Serguei Katkov <serguei.katkov@azul.com>

[Greedy RA] Add a check to MachineVerifier

If Virtual Register is alive in landing pad its def must be
before the call causing the exception or it should be statepoint instruction itself and
in this

[Greedy RA] Add a check to MachineVerifier

If Virtual Register is alive in landing pad its def must be
before the call causing the exception or it should be statepoint instruction itself and
in this case def actually means the relocation of gc pointer and is alive in
landing pad.

The test shows the triggering this check for an option under development
use-registers-for-gc-values-in-landing-pad which is off by default until
it is functionally correct.

Reviewers: reames, void, jyknight, nickdesaulniers, efriedma, arsenm, rnk
Reviewed By: rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D100525

show more ...


Revision tags: llvmorg-12.0.0-rc4
# 55533203 25-Mar-2021 Amara Emerson <amara@apple.com>

[GlobalISel] Add G_ROTR and G_ROTL opcodes for rotates.

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


# 23f657c1 25-Mar-2021 Jessica Paquette <jpaquette@apple.com>

[AArch64][GlobalISel] Emit bzero on Darwin

Darwin platforms for both AArch64 and X86 can provide optimized `bzero()`
routines. In this case, it may be preferable to use `bzero` in place of a
memset

[AArch64][GlobalISel] Emit bzero on Darwin

Darwin platforms for both AArch64 and X86 can provide optimized `bzero()`
routines. In this case, it may be preferable to use `bzero` in place of a
memset of 0.

This adds a G_BZERO generic opcode, similar to G_MEMSET et al. This opcode can
be generated by platforms which may want to use bzero.

To emit the G_BZERO, this adds a pre-legalize combine for AArch64. The
conditions for this are largely a port of the bzero case in
`AArch64SelectionDAGInfo::EmitTargetCodeForMemset`.

The only difference in comparison to the SelectionDAG code is that, when
compiling for minsize, this will fire for all memsets of 0. The original code
notes that it's not beneficial to do this for small memsets; however, using
bzero here will save a mov from wzr. For minsize, I think that it's preferable
to prioritise omitting the mov.

This also fixes a bug in the libcall legalization code which would delete
instructions which could not be legalized. It also adds a check to make sure
that we actually get a libcall name.

Code size improvements (Darwin):

- CTMark -Os: -0.0% geomean (-0.1% on pairlocalalign)
- CTMark -Oz: -0.2% geomean (-0.5% on bullet)

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

show more ...


# 4773dd5b 11-Mar-2021 Jessica Paquette <jpaquette@apple.com>

[GlobalISel] Add G_SBFX + G_UBFX (bitfield extraction opcodes)

There is a bunch of similar bitfield extraction code throughout *ISelDAGToDAG.

E.g, ARMISelDAGToDAG, AArch64ISelDAGToDAG, and AMDGPUIS

[GlobalISel] Add G_SBFX + G_UBFX (bitfield extraction opcodes)

There is a bunch of similar bitfield extraction code throughout *ISelDAGToDAG.

E.g, ARMISelDAGToDAG, AArch64ISelDAGToDAG, and AMDGPUISelDAGToDAG all contain
code that matches a bitfield extract from an and + right shift.

Rather than duplicating code in the same way, this adds two opcodes:

- G_UBFX (unsigned bitfield extract)
- G_SBFX (signed bitfield extract)

They work like this

```
%x = G_UBFX %y, %lsb, %width
```

Where `lsb` and `width` are

- The least-significant bit of the extraction
- The width of the extraction

This will extract `width` bits from `%y`, starting at `lsb`. G_UBFX zero-extends
the result, while G_SBFX sign-extends the result.

This should allow us to use the combiner to match the bitfield extraction
patterns rather than duplicating pattern-matching code in each target.

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

show more ...


Revision tags: llvmorg-12.0.0-rc3
# 6dcc325c 08-Mar-2021 Min-Yih Hsu <minyihh@uci.edu>

[M68k][MIR](2/8) Changes in the target-independent MIR part

- Add new callback in `TargetInstrInfo` --
`isPCRelRegisterOperandLegal` -- to query whether pc-rel
register MachineOperand is legal

[M68k][MIR](2/8) Changes in the target-independent MIR part

- Add new callback in `TargetInstrInfo` --
`isPCRelRegisterOperandLegal` -- to query whether pc-rel
register MachineOperand is legal.
- Add new function to search DebugLoc in a reverse ordering

Authors: myhsu, m4yers, glaubitz

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

show more ...


# 361cfdf2 28-Feb-2021 Matt Arsenault <Matthew.Arsenault@amd.com>

GlobalISel: Verify G_CONCAT_VECTORS has at least 2 sources


Revision tags: llvmorg-12.0.0-rc2
# 60aa6464 17-Feb-2021 Jessica Paquette <jpaquette@apple.com>

[GlobalISel] Add G_ASSERT_SEXT

This adds a G_ASSERT_SEXT opcode, similar to G_ASSERT_ZEXT. This instruction
signifies that an operation was already sign extended from a smaller type.

This is useful

[GlobalISel] Add G_ASSERT_SEXT

This adds a G_ASSERT_SEXT opcode, similar to G_ASSERT_ZEXT. This instruction
signifies that an operation was already sign extended from a smaller type.

This is useful for functions with sign-extended parameters.

E.g.

```
define void @foo(i16 signext %x) {
...
}
```

This adds verifier, regbankselect, and instruction selection support for
G_ASSERT_SEXT equivalent to G_ASSERT_ZEXT.

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

show more ...


# 910e2d1e 14-Feb-2021 Kazu Hirata <kazu@google.com>

[llvm] Use llvm::is_contained (NFC)


# 7c749baa 12-Feb-2021 Jay Foad <jay.foad@amd.com>

[GlobalISel] Simpler verification of G_SEXT_INREG and G_ASSERT_ZEXT

There's no need to call verifyVectorElementMatch since we already know
that the source and destination types are identical.

Diffe

[GlobalISel] Simpler verification of G_SEXT_INREG and G_ASSERT_ZEXT

There's no need to call verifyVectorElementMatch since we already know
that the source and destination types are identical.

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

show more ...


Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1
# 24261729 27-Jan-2021 Jessica Paquette <jpaquette@apple.com>

[GlobalISel] Add G_ASSERT_ZEXT

This adds a generic opcode which communicates that a type has already been
zero-extended from a narrower type.

This is intended to be similar to AssertZext in Selecti

[GlobalISel] Add G_ASSERT_ZEXT

This adds a generic opcode which communicates that a type has already been
zero-extended from a narrower type.

This is intended to be similar to AssertZext in SelectionDAG.

For example,

```
%x_was_extended:_(s64) = G_ASSERT_ZEXT %x, 16
```

Signifies that the top 48 bits of %x are known to be 0.

This is useful in cases like this:

```
define i1 @zeroext_param(i8 zeroext %x) {
%cmp = icmp ult i8 %x, -20
ret i1 %cmp
}
```

In AArch64, `%x` must use a 32-bit register, which is then truncated to a 8-bit
value.

If we know that `%x` is already zero-ed out in the relevant high bits, we can
avoid the truncate.

Currently, in GISel, this looks like this:

```
_zeroext_param:
and w8, w0, #0xff ; We don't actually need this!
cmp w8, #236
cset w0, lo
ret
```

While SDAG does not produce the truncation, since it knows that it's
unnecessary:

```
_zeroext_param:
cmp w0, #236
cset w0, lo
ret
```

This patch

- Adds G_ASSERT_ZEXT
- Adds MIRBuilder support for it
- Adds MachineVerifier support for it
- Documents it

It also puts G_ASSERT_ZEXT into its own class of "hint instruction." (There
should be a G_ASSERT_SEXT in the future, maybe a G_ASSERT_ALIGN as well.)

This allows us to skip over hints in the legalizer etc. These can then later
be selected like COPY instructions or removed.

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

show more ...


Revision tags: llvmorg-13-init
# c5c4dbd2 22-Jan-2021 Kazu Hirata <kazu@google.com>

[CodeGen] Use llvm::append_range (NFC)


Revision tags: llvmorg-11.1.0-rc2
# b023cdea 20-Jan-2021 Kazu Hirata <kazu@google.com>

[llvm] Use llvm::all_of (NFC)


12345678910>>...23