platform/upstream/llvm.git
21 months agoReland "[Clang][LoongArch] Add inline asm support for constraints k/m/ZB/ZC"
Weining Lu [Tue, 11 Oct 2022 11:13:18 +0000 (19:13 +0800)]
Reland "[Clang][LoongArch] Add inline asm support for constraints k/m/ZB/ZC"

Reference: https://gcc.gnu.org/onlinedocs/gccint/Machine-Constraints.html

k: A memory operand whose address is formed by a base register and
(optionally scaled) index register.

m: A memory operand whose address is formed by a base register and
offset that is suitable for use in instructions with the same
addressing mode as st.w and ld.w.

ZB: An address that is held in a general-purpose register. The offset
is zero.

ZC: A memory operand whose address is formed by a base register and
offset that is suitable for use in instructions with the same
addressing mode as ll.w and sc.w.

Note:
The INLINEASM SDNode flags in below tests are updated because the new
introduced enum `Constraint_k` is added before `Constraint_m`.
  llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-inline-asm.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-inline-asm.ll
  llvm/test/CodeGen/X86/callbr-asm-kill.mir

This patch passes `ninja check-all` on a X86 machine with all official
targets and the LoongArch target enabled.

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

21 months ago[AMDGPU][MC] Correct image_gather4h
Dmitry Preobrazhensky [Tue, 11 Oct 2022 11:40:23 +0000 (14:40 +0300)]
[AMDGPU][MC] Correct image_gather4h

Correct encoding of image_gather4h for GFX9; disable this instruction for SI, CI and VI.

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

21 months ago[AArch64] Add SEH_Nop opcodes for BTI hints
Martin Storsjö [Wed, 5 Oct 2022 10:49:20 +0000 (13:49 +0300)]
[AArch64] Add SEH_Nop opcodes for BTI hints

These are harmless for the unwinder - the unwinder doesn't need to
handle them for being able to unwind correctly.

Only add the opcodes when the branch target is in a SEH prologue;
for jumptables e.g. within a function, we shouldn't add any SEH
opcodes.

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

21 months ago[llvm-readobj] Decode the new ARM64 SEH info for return address signing
Martin Storsjö [Wed, 5 Oct 2022 09:04:02 +0000 (12:04 +0300)]
[llvm-readobj] Decode the new ARM64 SEH info for return address signing

This got documented upstream in
https://github.com/MicrosoftDocs/cpp-docs/pull/4202.

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

21 months agoRevert "[clang][LoongArch] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for...
Weining Lu [Tue, 11 Oct 2022 11:21:28 +0000 (19:21 +0800)]
Revert "[clang][LoongArch] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for LoongArch"

This reverts commit 6547565e7bdcd9c3f683ad196b62d08c7061fdf1.

This breaks test: Preprocessor/init-loongarch.c

21 months ago[CostModel][X86] Add insertelement costs into a known base vector value
Simon Pilgrim [Tue, 11 Oct 2022 11:07:13 +0000 (12:07 +0100)]
[CostModel][X86] Add insertelement costs into a known base vector value

We were only testing inserting into undef/poison base vectors

Test coverage for Issue #58261

21 months ago[LoongArch] Define getSetCCResultType for setting vector setCC type
wanglei [Tue, 11 Oct 2022 10:50:11 +0000 (18:50 +0800)]
[LoongArch] Define getSetCCResultType for setting vector setCC type

To avoid trigger "No default SetCC type for vectors!" Assertion.

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

21 months ago[mlir] use raw function pointer instead of std::function
Alex Zinenko [Tue, 11 Oct 2022 10:55:51 +0000 (10:55 +0000)]
[mlir] use raw function pointer instead of std::function

Accessing the target of std::function apparently requires RTTI, use a
raw pointer instead.

21 months ago[clang][LoongArch] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for LoongArch
wanglei [Tue, 11 Oct 2022 10:12:28 +0000 (18:12 +0800)]
[clang][LoongArch] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for LoongArch

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

21 months ago[LoongArch] Add codegen support of GlobalTLSAddress lowering
wanglei [Tue, 11 Oct 2022 09:43:59 +0000 (17:43 +0800)]
[LoongArch] Add codegen support of GlobalTLSAddress lowering

There are static and dynamic TLS address lowering in DAG stage according
to different TLS models.

TLS address will be lowered to pseudo instruction and then expanded by
the `LoongArch Pre-RA pseudo instruction expansion` pass.

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

21 months ago[mlir] switch the transform loop extension to use types
Alex Zinenko [Mon, 10 Oct 2022 14:38:31 +0000 (14:38 +0000)]
[mlir] switch the transform loop extension to use types

Add types to the Loop (SCF) extension of the transform dialect.

See https://discourse.llvm.org/t/rfc-type-system-for-the-transform-dialect/65702

Reviewed By: nicolasvasilache

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

21 months ago[mlir] add OperationType to the Transform dialect
Alex Zinenko [Mon, 10 Oct 2022 14:33:59 +0000 (14:33 +0000)]
[mlir] add OperationType to the Transform dialect

Add a new OperationType handle type to the Transform dialect. This
transform type is parameterized by the name of the payload operation it
can point to. It is intended as a constraint on transformations that are
only applicable to a specific kind of payload operations. If a
transformation is applicable to a small set of operation classes, it can
be wrapped into a transform op by using a disjunctive constraint, such
as `Type<Or<[Transform_ConcreteOperation<"foo">.predicate,
Transform_ConcreteOperation<"bar">.predicate]>>` for its operand without
modifying this type. Broader sets of accepted operations should be
modeled as specific types.

Reviewed By: nicolasvasilache

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

21 months ago[mlir] cleanup transform payload setting
Alex Zinenko [Fri, 7 Oct 2022 15:04:36 +0000 (15:04 +0000)]
[mlir] cleanup transform payload setting

Before the multi-handle relaxation, the transform interpreter did not
actually set payload for a handle that had no further uses as a hacky
mechanism to work around the multi-handle problem. This is no longer
necessary and can be removed to avoid debugging surprises when a handle
has no payload even when its producing op assigned it.

Reviewed By: nicolasvasilache

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

21 months ago[mlir] switch transform dialect ops to use TransformTypeInterface
Alex Zinenko [Wed, 5 Oct 2022 14:23:19 +0000 (14:23 +0000)]
[mlir] switch transform dialect ops to use TransformTypeInterface

Use the recently introduced TransformTypeInterface instead of hardcoding
the PDLOperationType. This will allow the operations to use more
specific transform types to express pre/post-conditions in the future.
It requires the syntax and Python op construction API to be updated.
Dialect extensions will be switched separately.

Reviewed By: nicolasvasilache

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

21 months ago[mlir] clean up transform dialect definitions, NFC
Alex Zinenko [Tue, 4 Oct 2022 15:49:30 +0000 (15:49 +0000)]
[mlir] clean up transform dialect definitions, NFC

Refactor the definition of the Transform dialect to move non-trivial
method implementations out of the .td file, and detemplatize functions
when possible while moving their implementations to a .cpp.

Reviewed By: nicolasvasilache

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

21 months ago[mlir] add types to the transform dialect
Alex Zinenko [Tue, 4 Oct 2022 11:49:21 +0000 (11:49 +0000)]
[mlir] add types to the transform dialect

Introduce a type system for the transform dialect. A transform IR type
captures the expectations of the transform IR on the payload IR
operations that are being transformed, such as being of a certain kind
or implementing an interface that enables the transformation. This
provides stricter checking and better readability of the transform IR
than using the catch-all "handle" type.

This change implements the basic support for a type system amendable to
dialect extensions and adds a drop-in replacement for the unrestricted
"handle" type. The actual switch of transform dialect ops to that type
will happen in a separate commit.

See https://discourse.llvm.org/t/rfc-type-system-for-the-transform-dialect/65702

Reviewed By: nicolasvasilache

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

21 months ago[mlir][gpu] Add `subgroup_reduce` operation
Ivan Butygin [Wed, 5 Oct 2022 21:57:33 +0000 (23:57 +0200)]
[mlir][gpu] Add `subgroup_reduce` operation

Introduce `subgroup_reduce` operation, similar to `all_reduce`, but operating on subgroup scope instead of workgroup.
It is intended as low-level building block for more high level abstractions (e.g for workgroup-wide `all_reduce` ops).
Only introduce version taking reduce operation enum for simplicity sake.

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

21 months ago[mlir][Linalg] Retire LinalgStrategyTilePass and filter-based pattern.
Nicolas Vasilache [Mon, 10 Oct 2022 09:05:14 +0000 (02:05 -0700)]
[mlir][Linalg] Retire LinalgStrategyTilePass and filter-based pattern.

Context: https://discourse.llvm.org/t/psa-retire-linalg-filter-based-patterns/63785

Uses of `LinalgTilingPattern::returningMatchAndRewrite` are replaced by a top-level `tileWithLinalgTilingOptions` function that is marked obsolete and serves
as a temporary means to transition away from `LinalgTilingOptions`-based tiling.
LinalgTilingOptions supports too many options that have been orthogonalized with the use of the transform dialect.

Additionally, the revision introduces a `transform.structured.tile_to_scf_for` structured transform operation that is needed to properly tile `tensor.pad`
via the TilingInterface. Uses of `transform.structured.tile` will be deprecated and replaced by this new op.
This will achieve the deprecation of `linalg::tileLinalgOp`.
Context: https://discourse.llvm.org/t/psa-retire-tileandfuselinalgops-method/63850

In the process of transitioning, tests that were performing tile and distribute on tensors are retired: transformations should be orthogonalized better in the future.
In particular, tiling to specific loop types and tileAndDistribute behavior are not available via the transform ops.
The behavior is still available as part of the `tileWithLinalgTilingOptions` method to allow downstream clients to transition without breakages but is meant to be retired soon.

As more tests are ported to the transform dialect, it became necessary to introduce a test-transform-dialect-erase-schedule-pass to discard the transform specification
once applied so that e2e lowering and execution is possible.

Lastly, a number of redundant tests that were testing composition of patterns are retired as they are available with a better mechanism via the transform dialect.

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

21 months ago[SimplifyLibCalls] Use helper methods to query attributes (NFC)
Nikita Popov [Tue, 11 Oct 2022 09:41:28 +0000 (11:41 +0200)]
[SimplifyLibCalls] Use helper methods to query attributes (NFC)

21 months ago[Attributes] Return Optional from getAllocSizeArgs() (NFC)
Nikita Popov [Tue, 11 Oct 2022 09:01:29 +0000 (11:01 +0200)]
[Attributes] Return Optional from getAllocSizeArgs() (NFC)

As suggested on D135572, return Optional<> from getAllocSizeArgs()
rather than the peculiar pair(0, 0) sentinel.

The method on Attribute itself does not return Optional, because
the attribute must exist in that case.

21 months ago[Attributes] Support int attributes with zero value
Nikita Popov [Mon, 10 Oct 2022 11:57:24 +0000 (13:57 +0200)]
[Attributes] Support int attributes with zero value

This regularly comes up as a stumbling stone when adding int
attributes: They currently need to be encoded in a way to avoids
the zero value.

This adds support for zero-value int attributes by a) making the
ctor determine int/enum attribute based on attribute kind, not
whether the value is non-zero and b) switching getRawIntAttr()
to return an Optional, so that it's possible to distinguish a zero
value from non-existence.

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

21 months ago[AttrBuilder] Remove unused vscale accessors (NFC)
Nikita Popov [Tue, 11 Oct 2022 08:29:44 +0000 (10:29 +0200)]
[AttrBuilder] Remove unused vscale accessors (NFC)

These accessors are not used. Generally, nowadays it is preferable
to perform queries on AttributeSets/Lists, rather than the
AttrBuilder, which is optimized towards attribute construction now.

21 months ago[AArch64][ARM] Alter most of arm_neon.h to be target-based, not preprocessor based.
David Green [Tue, 11 Oct 2022 08:09:16 +0000 (09:09 +0100)]
[AArch64][ARM] Alter most of arm_neon.h to be target-based, not preprocessor based.

Similar to D131064, this alters most of the intrinsics in arm_neon.h to
be target based, not preprocessor based. The intrinsics that are changed
are the ones with obvious target features (fp16, fp16fml, cryptos, i8mm
and bf16). The ones that are not yet altered are the ones without target
features like rdma (8.1) and complex (8.3). Those will be switched in a
followup patch that allows targeting architecture versions.

The existing ArchGuard in arm_neon.td is split into ArchGuard that still
adds ifdef defines (for example for intrinsics that require __aarch64__),
and TargetGuards for intrinsics dependant on target features. From there
the TargetGuards are used in two ways:
 - For intrinsics emitted as functions, __attribute__((target(TargetGuard)))
   is added to the definition of the function. Along with the existing
   always_inline intrinsic, this will give a compile time error if the
   function is used in a context where the target feature is not available.
 - For intrinsics emitted as macros, the __builtins are emitted into
   arm_neon.inc using TARGET_BUILTIN as opposed to BUILTIN, which includes
   the target feature and gives an error if the builtin is found in a
   function without the required features, similar to arm_sve.h.

The second method requires that the intrinsics be separable from the
existing _v intrinsics used in other types. For example
__builtin_neon_splat_lane_bf16 is used as opposed to
__builtin_neon_splat_lane_v. There are some adjustments to the CGBuiltin
to account for intrinsics that can be treated similarly, except for
their target features.

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

21 months ago[Attributes] Remove AttrBuilder::hasAlignmentAttr() method (NFC)
Nikita Popov [Tue, 11 Oct 2022 07:56:37 +0000 (09:56 +0200)]
[Attributes] Remove AttrBuilder::hasAlignmentAttr() method (NFC)

This was the odd one out, with similar methods not existing for
any other attributes. In the places where it is used, it is best
replaced by AttrBuilder::getAttribute(), which allows us to both
test for presence of the attribute and retrieve its value at the
same time. (To just check for presence, contains() could be used.)

21 months ago[AsmParser] Remove some redundant checks for align attributes
Nikita Popov [Tue, 11 Oct 2022 07:53:08 +0000 (09:53 +0200)]
[AsmParser] Remove some redundant checks for align attributes

The verifier already has a more general check that the attribute is
legal for the position it is used in.

21 months ago[Attributes] Remove special SRet/ByVal attribute handling in C API
Nikita Popov [Tue, 11 Oct 2022 07:39:39 +0000 (09:39 +0200)]
[Attributes] Remove special SRet/ByVal attribute handling in C API

Proper construction functions for these have long since been
exposed, and these attributes require a type nowadays, so drop the
old compatibility code.

21 months ago[MustExec][LICM] Handle latch being part of an inner cycle (PR57780)
Nikita Popov [Tue, 20 Sep 2022 11:04:27 +0000 (13:04 +0200)]
[MustExec][LICM] Handle latch being part of an inner cycle (PR57780)

The algorithm in allLoopPathsLeadToBlock() does not handle the case
where the loop latch is part of the predecessor set correctly: In
this case, we may take the backedge (escaping to a different loop
iteration) and not execute other latch successors. This can happen
if the latch is part of an inner cycle.

Fixes https://github.com/llvm/llvm-project/issues/57780.

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

21 months ago[test] Require aarch64-registered-target
Fangrui Song [Tue, 11 Oct 2022 05:27:26 +0000 (22:27 -0700)]
[test] Require aarch64-registered-target

21 months ago[libc] Add POSIX functions posix_spawn_file_actions_*.
Siva Chandra Reddy [Mon, 10 Oct 2022 08:35:21 +0000 (08:35 +0000)]
[libc] Add POSIX functions posix_spawn_file_actions_*.

Namely, posix_spawn_file_actions_addclose,
posix_spawn_file_actions_adddup2, posix_spawn_file_actions_addopen,
posix_spawn_file_actions_destroy, posix_spawn_file_actions_init have
been added.

Reviewed By: michaelrj, lntue

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

21 months ago[MC][test] Add Mach-O .addrsig test
Fangrui Song [Tue, 11 Oct 2022 04:10:35 +0000 (21:10 -0700)]
[MC][test] Add Mach-O .addrsig test

21 months ago[clang-format] Fix mis-attributing preprocessor directives to macros
Jacob Abraham [Tue, 11 Oct 2022 02:57:17 +0000 (19:57 -0700)]
[clang-format] Fix mis-attributing preprocessor directives to macros

This solves the issue where a case statement inside a macro greedily
adds preprocessor lines such as #include to the macro even if they
are not a part of the macro to begin with.

Fixes #58214.

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

21 months ago[flang] Support GNU extensions IARGC and GETARG in runtime
Peixin-Qiao [Tue, 11 Oct 2022 02:29:23 +0000 (10:29 +0800)]
[flang] Support GNU extensions IARGC and GETARG in runtime

The GNU extension intrinsic IARGC is equivalent to
COMMAND_ARGUMENT_COUNT, and the GETARG is similar to
GET_COMMAND_ARGUMENT, but with less arguments. Reuse the runtime of
COMMAND_ARGUMENT_COUNT and GET_COMMAND_ARGUMENT for IARGC and GETARG.

Reviewed By: klausler

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

21 months ago[DeviceRTL] CMake fix using target-level dependency
Ye Luo [Mon, 10 Oct 2022 22:53:50 +0000 (17:53 -0500)]
[DeviceRTL] CMake fix using target-level dependency

File-level dependency should not be used on files generated during the build. The next command may execute before the generating command finishes writing the file. Use add_custom_target and use target-level dependency.

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

21 months ago[flang][NFC] Fix typos in FIROps.td
Peixin-Qiao [Tue, 11 Oct 2022 01:51:36 +0000 (09:51 +0800)]
[flang][NFC] Fix typos in FIROps.td

Reviewed By: kiranchandramohan

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

21 months ago[flang][NFC] Fix fir::ConvertOp description
Peixin-Qiao [Tue, 11 Oct 2022 01:25:41 +0000 (09:25 +0800)]
[flang][NFC] Fix fir::ConvertOp description

According to the support of fir::ConvertOp conversion in CodeGen.cpp,
it also supports integer to pointer conversion and pointer to integer
conversion. The entity can be array, and the conversion type can be
pointer to array.

Reviewed By: jeanPerier

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

21 months ago[clang] makes `__is_destructible` KEYALL instead of KEYMS
Christopher Di Bella [Thu, 6 Oct 2022 01:50:16 +0000 (01:50 +0000)]
[clang] makes `__is_destructible` KEYALL instead of KEYMS

This makes it possible to be used in all modes, instead of just when
`-fms-extensions` is enabled. Also moves the `-fms-extensions`-exclusive
traits into their own file so we can check the others aren't dependent
on this flag.

This is information that the compiler already has, and should be exposed
so that the library doesn't need to reimplement the exact same
functionality.

This was originally a part of D116280.

Depends on D135177.

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

21 months ago[clang] adds `__is_scoped_enum`, `__is_nullptr`, and `__is_referenceable`
Christopher Di Bella [Tue, 4 Oct 2022 16:44:39 +0000 (16:44 +0000)]
[clang] adds `__is_scoped_enum`, `__is_nullptr`, and `__is_referenceable`

... as builtins.

This is information that the compiler already has, and should be exposed
so that the library doesn't need to reimplement the exact same
functionality.

This was originally a part of D116280.

Depends on D135175.

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

21 months ago[clang] adds `__is_bounded_array` and `__is_unbounded_array` as builtins
Christopher Di Bella [Tue, 4 Oct 2022 15:49:20 +0000 (15:49 +0000)]
[clang] adds `__is_bounded_array` and `__is_unbounded_array` as builtins

This is information that the compiler already has, and should be exposed
so that the library doesn't need to reimplement the exact same
functionality.

This was originally a part of D116280.

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

21 months ago[mlir][arith] Fix another file header (NFC)
Jeff Niu [Tue, 11 Oct 2022 00:03:35 +0000 (17:03 -0700)]
[mlir][arith] Fix another file header (NFC)

21 months ago[flang] Add type-specific runtime entries for Minloc/Maxloc.
Slava Zakharin [Mon, 10 Oct 2022 17:43:01 +0000 (10:43 -0700)]
[flang] Add type-specific runtime entries for Minloc/Maxloc.

We used to have a big switch statement over the type categories and kinds
inside Minloc/Maxloc. After D133051 the switch grew bigger, and this
changed inlining decisions made by GCC (the build compiler). Some of the
simple methods stopped being inlined, and this caused slight performance
regression in Polyhedron/gas_dyn2. This change adds separate entries
for real/integer data types to let them be optimized separately.

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

21 months ago[mlir][arith] Fix header spacing (NFC)
Jeff Niu [Mon, 10 Oct 2022 23:51:04 +0000 (16:51 -0700)]
[mlir][arith] Fix header spacing (NFC)

21 months ago[libc] fix header list for x86_64
Michael Jones [Mon, 10 Oct 2022 22:35:16 +0000 (15:35 -0700)]
[libc] fix header list for x86_64

Some headers hadn't been added, this fixes that and improves the
ordering.

Reviewed By: sivachandra

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

21 months ago[libc] reset errno in isatty tests
Michael Jones [Mon, 10 Oct 2022 22:48:18 +0000 (15:48 -0700)]
[libc] reset errno in isatty tests

Errno wasn't getting reset between tests, causing cascading failures.

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

21 months ago[mlir][tosa] Fix tosa::Select to linalg::generic indexingMaps bug
AmosLewis [Mon, 10 Oct 2022 22:47:50 +0000 (15:47 -0700)]
[mlir][tosa] Fix tosa::Select to linalg::generic indexingMaps bug

The tosa to linalg generic ops indexingMaps rank use is wrong.
 Find this bug in gpt2 pytorch model lowering to tosa.
 issue link is here https://github.com/llvm/llvm-project/issues/58154

Reviewed By: jpienaar

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

21 months ago[instcombine] (extelt (inselt Vec, Value, Index), Index) -> Value
Daniel Sanders [Mon, 10 Oct 2022 21:58:29 +0000 (14:58 -0700)]
[instcombine] (extelt (inselt Vec, Value, Index), Index) -> Value

When Index is variable but still trivially known to be equal we can use Value
from before the insertion, possibly eliminating the vector.

Reverts a functional change from:
Author: Philip Reames <listmail@philipreames.com>
Date:   Wed Dec 8 12:21:10 2021 -0800

    [instcombine] A couple style tweaks to visitExtractElementInst [nfc]

Thanks to Michele Scandale for identifying the bug

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

21 months ago[libc] handle case where /dev/tty doesn't exist
Michael Jones [Mon, 10 Oct 2022 22:39:38 +0000 (15:39 -0700)]
[libc] handle case where /dev/tty doesn't exist

In the isatty test it was assumed that /dev/tty existed, but that's not
always the case. Now we check for that.

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

21 months agoRevert "[gn build] Don't set LLVM_UNREACHABLE_OPTIMIZE when llvm_enable_assertions"
Arthur Eubanks [Mon, 10 Oct 2022 22:18:43 +0000 (15:18 -0700)]
Revert "[gn build] Don't set LLVM_UNREACHABLE_OPTIMIZE when llvm_enable_assertions"

This reverts commit 0f19c603423e28ab663c1fdff2048c555abe5f6d.

This didn't actually do anything. llvm_unreachable() under `#ifndef NDEBUG` is always supposed to report an error regardless of LLVM_UNREACHABLE_OPTIMIZE. I can't reproduce the issue I was originally seeing with this reverted, not sure what was happening back then, manually verified by messing around with various binaries/configurations.

21 months ago[libc] add isatty
Michael Jones [Mon, 10 Oct 2022 21:37:21 +0000 (14:37 -0700)]
[libc] add isatty

The isatty function uses the side effects of an ioctl call to determine
if a specific file descriptor is a terminal. I chose TIOCGETD (get line
discipline of terminal) because it didn't require any new structs.

Reviewed By: sivachandra, lntue

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

21 months ago[mlir][sparse] fixed memory leak on sparse tensors
Aart Bik [Mon, 10 Oct 2022 22:10:25 +0000 (15:10 -0700)]
[mlir][sparse] fixed memory leak on sparse tensors

This was introduced by https://reviews.llvm.org/D134933
This change also cleans up a dump&release method which
had become a misnomer after prior bufferization improvement.

Reviewed By: Peiming

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

21 months ago[NFCI] More TypeCategoryImpl refactoring.
Jorge Gorbe Moya [Thu, 22 Sep 2022 18:00:22 +0000 (11:00 -0700)]
[NFCI] More TypeCategoryImpl refactoring.

The main aim of this patch is to delete the remaining instances of code
reaching into the internals of `TypeCategoryImpl`. I made the following
changes:

- Add some more methods to `TieredFormatterContainer` and
  `TypeCategoryImpl` to expose functionality that is implemented in
  `FormattersContainer`.

- Add new overloads of `TypeCategoryImpl::AddTypeXXX` to make it easier
  to add formatters to categories without reaching into the internal
  `FormattersContainer` objects.

- Remove the `GetTypeXXXContainer` and `GetRegexTypeXXXContainer`
  accessors from `TypeCategoryImpl` and update all call sites to use the
  new methods instead.

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

21 months ago[SPIRV] Fix call lowering of "anonymous" functions
Michal Paszkowski [Thu, 6 Oct 2022 19:35:41 +0000 (21:35 +0200)]
[SPIRV] Fix call lowering of "anonymous" functions

The patch fixes lowering of anonymous functions, removes file/linkage
info for builtin call demangling, and adds relevant test demonstrating
a fixed problem.

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

21 months agoRevert "[TargetLowering][RISCV][X86] Support even divisors in expandDIVREMByConstant."
Craig Topper [Mon, 10 Oct 2022 21:50:06 +0000 (14:50 -0700)]
Revert "[TargetLowering][RISCV][X86] Support even divisors in expandDIVREMByConstant."

This reverts commit d4facda414b6b9b8b1a34bc7e6b7c15172775318.

This has been reported to cause failures. Reverting while I investigate.

21 months ago[libc] add sysconf with pagesize
Michael Jones [Thu, 22 Sep 2022 20:35:49 +0000 (13:35 -0700)]
[libc] add sysconf with pagesize

The sysconf function has many options, this patch adds the basic funtion
and the pagesize option. More options will be added in future patches.

Reviewed By: sivachandra

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

21 months ago[mlir][Vector] Introduce 'vector.mask' operation and MaskableOpInterface
Diego Caballero [Mon, 10 Oct 2022 21:21:03 +0000 (21:21 +0000)]
[mlir][Vector] Introduce 'vector.mask' operation and MaskableOpInterface

This patch introduces the `vector.mask` operation and the MaskableOpInterface
as described in https://discourse.llvm.org/t/rfc-vector-masking-representation-in-mlir/64964.
The `vector.mask` operation is used to predicate the execution of operations
implementing the MaskableOpInterface. This interface will be implemented by maskable
operations and provides information about its masking constraints and semantics.

For now, only vector transfer and reduction ops implement the MaskableOpInterface
for illustration and testing purposes.

Reviewed By: nicolasvasilache, rriddle

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

21 months ago[ARM] Add errors for MVE exclusive registers.
David Green [Mon, 10 Oct 2022 21:06:35 +0000 (22:06 +0100)]
[ARM] Add errors for MVE exclusive registers.

These instructions already had errors for operands that could not share
the same register:
  VCMUL, VMULL, VQDMULL.
This extends that to a few others:
  VREV64, VQDMULLqr, VCADD and VHCADD.
Only the i32 types require the error.

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

21 months ago[LinkerWrapper] Fix failing linker wrapper save temps test
Joseph Huber [Mon, 10 Oct 2022 20:55:55 +0000 (15:55 -0500)]
[LinkerWrapper] Fix failing linker wrapper save temps test

Summary:
This test started failing locally due to a misspelling of `-save-temps`
for the linker wrapper and the `ls` command not having the glob
arguments put in a string. This patch should fix it.

21 months ago[NFC][3/n] Remove enable-new-pm from Inline tests
Sebastian Peryt [Mon, 10 Oct 2022 20:39:38 +0000 (13:39 -0700)]
[NFC][3/n] Remove enable-new-pm from Inline tests

This change is updating remaining Inline tests
by removing -enable-new-pm=0 flag and adjusting CHECKs
where it is required.

Reviewed By: aeubanks

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

21 months ago[AMDGPU] Fix True16 patterns for cmp on GFX11
Joe Nash [Mon, 10 Oct 2022 18:37:18 +0000 (14:37 -0400)]
[AMDGPU] Fix True16 patterns for cmp on GFX11

These patterns should have a True16 version and a non-true16 version.

Reviewed By: arsenm

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

21 months ago[mlir][linalg] Remove redundant check on linalgOps to fix windows builder
Stanley Winata [Mon, 10 Oct 2022 20:12:41 +0000 (13:12 -0700)]
[mlir][linalg] Remove redundant check on linalgOps to fix windows builder

One of the assertion is causing signed/unsigned mismatch. However this
assertion seems redundant and is no longer used.

Reviewed By: mravishankar, ThomasRaoux

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

21 months ago[lld-macho] Flip ZERO_AR_DATE default
Keith Smiley [Sun, 9 Oct 2022 04:04:56 +0000 (21:04 -0700)]
[lld-macho] Flip ZERO_AR_DATE default

Previously unless ZERO_AR_DATE was set to any value, ld64.lld would
embed non-hermetic timestamps into the final binary. This flips that
default to zero those values unless ZERO_AR_DATE is set explicitly to 0.
As far as I know there isn't a downside to this, except that it differs
from ld64.

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

21 months ago[mlir] Fix a warning
Kazu Hirata [Mon, 10 Oct 2022 19:57:25 +0000 (12:57 -0700)]
[mlir] Fix a warning

This patch fixes:

  mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1051:40: error: comparison
  of integers of different signs: 'int64_t' (aka 'long') and
  'std::size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]

21 months agoReword diagnostics for style; NFC
Aaron Ballman [Mon, 10 Oct 2022 19:53:48 +0000 (15:53 -0400)]
Reword diagnostics for style; NFC

This removes the capital letter at the start of a few diagnostics and
reformats the nearby diagnostics to match the local style.

21 months ago[Clang] reject bit-fields as instruction operands in Microsoft style inline asm blocks.
Tom Honermann [Fri, 7 Oct 2022 21:13:46 +0000 (14:13 -0700)]
[Clang] reject bit-fields as instruction operands in Microsoft style inline asm blocks.

MSVC allows bit-fields to be specified as instruction operands in inline asm
blocks. Such references are resolved to the address of the allocation unit that
the named bitfield is a part of. The result is that reads and writes of such
operands will read or mutate nearby bit-fields stored in the same allocation
unit. This is a surprising behavior for which MSVC issues warning C4401,
"'<identifier>': member is bit field". Intel's icc compiler also allows such
bit-field references, but does not issue a diagnostic.

Prior to this change, Clang fails the following assertion when a bit-field is
referenced in such instructions:
  clang/lib/CodeGen/CGValue.h:338: llvm::Value* clang::CodeGen::LValue::getPointer(clang::CodeGen::CodeGenFunction&) const: Assertion `isSimple()' failed.
In non-assert enabled builds, Clang's behavior appears to match the behavior
of the MSVC and icc compilers, though it is unknown if that is by design or
happenstance.

Following this change, attempts to use a bit-field as an instruction operand
in Microsoft style asm blocks is diagnosed as an error due to the risk of
unintentionally reading or writing nearby bit-fields.

Fixes https://github.com/llvm/llvm-project/issues/57791

Reviewed By: erichkeane, aaron.ballman

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

21 months ago[clang] Mention -Werror changes revived for Clang 16
Sam James [Sun, 9 Oct 2022 22:39:23 +0000 (23:39 +0100)]
[clang] Mention -Werror changes revived for Clang 16

-Wimplicit-function-declaration and -Wimplicit-int become errors
by default in Clang 16 (originally in 15, but we reverted it in 15.0.1).

Mention it in the release notes like we did originally for Clang 15.

See https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 for more context.

Signed-off-by: Sam James <sam@gentoo.org>
Differential Revision: https://reviews.llvm.org/D135545

21 months ago[SCEV] Verify block disposition cache.
Florian Hahn [Mon, 10 Oct 2022 19:42:18 +0000 (20:42 +0100)]
[SCEV] Verify block disposition cache.

This extends the existing SCEV verification to catch cache invalidation
issues as in #57837.

The validation logic is similar to the recently added loop disposition
cache validation in bb68b2402daa9.

Reviewed By: nikic

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

21 months ago[ConstraintElimination] Regenerate check lines for test.
Florian Hahn [Mon, 10 Oct 2022 19:23:24 +0000 (20:23 +0100)]
[ConstraintElimination] Regenerate check lines for test.

Thanks @nikic for spotting that!

21 months ago[VectorCombine] convert scalar fneg with insert/extract to vector fneg
Sanjay Patel [Mon, 10 Oct 2022 18:58:43 +0000 (14:58 -0400)]
[VectorCombine] convert scalar fneg with insert/extract to vector fneg

insertelt DestVec, (fneg (extractelt SrcVec, Index)), Index --> shuffle DestVec, (fneg SrcVec), Mask

This is a specialized form of what could be a more general fold for a binop.
It's also possible that fneg is overlooked by SLP in this kind of
insert/extract pattern since it's a unary op.

This shows up in the motivating example from #issue 58139, but it won't solve
it (that probably requires some x86-specific backend changes). There are also
some small enhancements (see TODO comments) that can be done as follow-up
patches.

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

21 months ago[VectorCombine] add test with out-of-bounds insert/extract index; NFC
Sanjay Patel [Mon, 10 Oct 2022 18:36:34 +0000 (14:36 -0400)]
[VectorCombine] add test with out-of-bounds insert/extract index; NFC

D135278

21 months agoUpdate implementation status of P2468R2
Utkarsh Saxena [Mon, 10 Oct 2022 18:16:45 +0000 (20:16 +0200)]
Update implementation status of P2468R2

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

21 months ago[AMDGPU][NFC] Update DW_OP_LLVM_overlay documentation
Tony Tye [Tue, 4 Oct 2022 23:12:41 +0000 (23:12 +0000)]
[AMDGPU][NFC] Update DW_OP_LLVM_overlay documentation

Update DWARF Extensions For Heterogeneous Debugging proposal for the
DW_OP_LLVM_overlay operation:

1. Add an example.
2. Correct typo in definition of rbss.
3. Correct definition to specify both operands of the
   DW_OP_bit_piece operations.

Reviewed By: zoran.zaric

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

21 months ago[mlir][linalg] Remove unused payload related OutOpOperand
Stanley Winata [Mon, 10 Oct 2022 18:29:15 +0000 (11:29 -0700)]
[mlir][linalg] Remove unused payload related OutOpOperand

Some higher level operations such as torch.max generates linalg generic
that returns both the index and the value of the max operation. However
sometimes not all information is being used. This however blocks
vectorization for certain cases which causes performance degradation.
This patch aims to fix this issue.

Reviewed By: mravishankar

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

21 months agoFix a typo in the Release Notes; NFC
Aaron Ballman [Mon, 10 Oct 2022 18:45:11 +0000 (14:45 -0400)]
Fix a typo in the Release Notes; NFC

21 months agoFix unused variable warning from D134529
Erich Keane [Mon, 10 Oct 2022 18:42:19 +0000 (11:42 -0700)]
Fix unused variable warning from D134529

21 months agoRevert "[LTO] Make local linkage GlobalValue in non-prevailing COMDAT available_exter...
Jordan Rupprecht [Mon, 10 Oct 2022 18:40:45 +0000 (11:40 -0700)]
Revert "[LTO] Make local linkage GlobalValue in non-prevailing COMDAT available_externally"

This reverts commit 4fbe33593c8132fdc48647c06f4d1455bfff1c88. It causes linking errors, with details provided internally. (Hopefully the author/reviewers will be able to upstream the internal repro).

21 months ago[libc] Add implementation of pthread_atfork.
Siva Chandra Reddy [Fri, 7 Oct 2022 08:07:59 +0000 (08:07 +0000)]
[libc] Add implementation of pthread_atfork.

Reviewed By: michaelrj

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

21 months agoFix a typo in the docs; NFC
Aaron Ballman [Mon, 10 Oct 2022 18:21:08 +0000 (14:21 -0400)]
Fix a typo in the docs; NFC

sence -> sense

Also re-flowed to the usual 80-col limit and added a comma.

21 months ago[mlir][sparse] Removing DLL attributes from ExecutionEngine/SparseTensor/Enums.h
wren romano [Sat, 8 Oct 2022 01:17:27 +0000 (18:17 -0700)]
[mlir][sparse] Removing DLL attributes from ExecutionEngine/SparseTensor/Enums.h

This differential attempts to resolve certain issues on Windows (e.g., https://reviews.llvm.org/D134933#3843372 and https://reviews.llvm.org/D133462#3844195).

Reviewed By: stella.stamenova, aganea

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

21 months ago[clang-format][docs][NFC] Fix invalid syntax in ShortLambdaStyle examples.
Emilia Dreamer [Mon, 10 Oct 2022 17:54:48 +0000 (20:54 +0300)]
[clang-format][docs][NFC] Fix invalid syntax in ShortLambdaStyle examples.

21 months agoRepair a confusing standards reference; NFC
Aaron Ballman [Mon, 10 Oct 2022 18:09:11 +0000 (14:09 -0400)]
Repair a confusing standards reference; NFC

There is no 6.9 in C++11, the quote actually lives in
[intro.multithread] for that revision. However, the words moved in
C++17 to [intro.progress] so I added that information as well.

21 months ago[TargetLowering][RISCV][X86] Support even divisors in expandDIVREMByConstant.
Craig Topper [Mon, 10 Oct 2022 17:46:29 +0000 (10:46 -0700)]
[TargetLowering][RISCV][X86] Support even divisors in expandDIVREMByConstant.

If the divisor is even, we can first shift the dividend and divisor
right by the number of trailing zeros. Now the divisor is odd and we
can do the original algorithm to calculate a remainder. Then we shift
that remainder left by the number of trailing zeros and add the bits
that were shifted out of the dividend.

Reviewed By: RKSimon

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

21 months agoImplement `getrandom` function for linux targets.
Schrodinger ZHU Yifan [Mon, 10 Oct 2022 18:00:13 +0000 (11:00 -0700)]
Implement `getrandom` function for linux targets.

Reviewed By: michaelrj, sivachandra

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

21 months agoAllow DynamicLoaderDarwinKernel to activate without binary
Jason Molenda [Mon, 10 Oct 2022 17:15:43 +0000 (10:15 -0700)]
Allow DynamicLoaderDarwinKernel to activate without binary

In https://reviews.llvm.org/D133534 I made a little cleanup
to DynamicLoaderDarwinKernel::CreateInstance and unintentionally
changed the logic.  Previously it would not create an instance
if there was a binary given to lldb and it was not a kernel.
With my change, the absence of any binary would also cause it
to not create.  So connecting to a kernel without any binaries
would fail.

rdar://100985097

21 months ago[LoopSimplifyCFG] Clear SCEV dispositions when removing dead blocks.
Florian Hahn [Mon, 10 Oct 2022 17:08:34 +0000 (18:08 +0100)]
[LoopSimplifyCFG] Clear SCEV dispositions when removing dead blocks.

When removing loops & blocks we also need to clear the SCEV dispositions
as they may now contain incorrect values.

Fixes #58262.

21 months ago[mlir][linalg] Expose pattern to collapse generic op dimensions
Thomas Raoux [Fri, 7 Oct 2022 23:59:06 +0000 (23:59 +0000)]
[mlir][linalg] Expose pattern to collapse generic op dimensions

Add a pattern to be able to collapse dimensions in a linalg generic op.

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

21 months ago[lldb][test] Skip TestStepAvoidsRegexp.py on Windows
Michael Buch [Mon, 10 Oct 2022 13:31:29 +0000 (14:31 +0100)]
[lldb][test] Skip TestStepAvoidsRegexp.py on Windows

21 months ago[Clang] Support constexpr builtin fmin
Evgeny Shulgin [Fri, 7 Oct 2022 21:46:18 +0000 (21:46 +0000)]
[Clang] Support constexpr builtin fmin

Support constexpr version of __builtin_fmin and its variations.

Reviewed By: jcranmer-intel

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

21 months ago[Clang][Sema] Narrow inline namespace filtration for unqualified friend declarations
Troy Johnson [Mon, 10 Oct 2022 15:34:14 +0000 (08:34 -0700)]
[Clang][Sema] Narrow inline namespace filtration for unqualified friend declarations

rG04ba1856 introduced a call to FilterLookupForScope that is expensive
for very large translation units where it was observed to cause a 6%
compile time degradation. As the comment states, the only effect is to
"remove declarations found in inline namespaces for friend declarations
with unqualified names." This change limits the call to that scenario.
The test that was added by rG04ba1856 continues to pass, but the
observed degradation is cut in half.

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

21 months ago[mlir][sparse] Rename SparseTensorFile to SparseTensorReader.
bixia1 [Fri, 7 Oct 2022 19:01:38 +0000 (12:01 -0700)]
[mlir][sparse] Rename SparseTensorFile to SparseTensorReader.

This is to prepare for adding SparseTensorWriter.

Reviewed By: wrengr

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

21 months ago[ConstraintElimination] Bail out for GEPs with scalable vectors.
Florian Hahn [Mon, 10 Oct 2022 15:01:20 +0000 (16:01 +0100)]
[ConstraintElimination] Bail out for GEPs with scalable vectors.

This fixes a crash with scalable vectors, thanks @nikic for spotting
this!

21 months ago[LICM] Disable thread-safety checks in single-thread model
Shubham Narlawar [Mon, 10 Oct 2022 14:47:14 +0000 (16:47 +0200)]
[LICM] Disable thread-safety checks in single-thread model

If the single-thread model is used, or the
-licm-force-thread-model-single flag is specified, skip checks
related to thread-safety. This means that store promotion for
conditionally executed stores only requires proof of
dereferenceability and writability, but not of thread-safety. For
example, this enables promotion of stores to (non-constant) globals,
as well as captured allocas.

Fixes https://github.com/llvm/llvm-project/issues/50537.

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

21 months agoRevert "[PGO] Make emitted symbols hidden"
Alex Brachet [Mon, 10 Oct 2022 14:37:59 +0000 (14:37 +0000)]
Revert "[PGO] Make emitted symbols hidden"

This reverts commit 4ea1a647ff0973c683dd71fec77e6fe7f6dfd2ca.

This breaks on Darwin which tries to export these symbols
https://github.com/llvm/llvm-project/blob/ebb258d3b0785f6dcc65e1f277d0690891ddc94d/clang/lib/Driver/ToolChains/Darwin.cpp#L1363

I'll try to reland which that removed and approval from
Apple folks.

21 months ago[AMDGPU] Make V_SAT_PK_U8_I16 a True16 Instruction
Joe Nash [Fri, 7 Oct 2022 18:56:36 +0000 (14:56 -0400)]
[AMDGPU] Make V_SAT_PK_U8_I16 a True16 Instruction

The return type is two u8 packed into a 16 bit VGPR, so this instruction
should be True16.

Reviewed By: dp

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

21 months ago[mlir][Bazel] Fix for reviews.llvm.org/D135559
Goran Flegar [Mon, 10 Oct 2022 14:27:53 +0000 (16:27 +0200)]
[mlir][Bazel] Fix for reviews.llvm.org/D135559

21 months agoPossibly fix sphinx regression from 6685e56ceddf
Erich Keane [Mon, 10 Oct 2022 14:22:41 +0000 (07:22 -0700)]
Possibly fix sphinx regression from 6685e56ceddf

It isn't clear that this is what it is complaining about, but looking
closer, I think this is what I got wrong here. So submitting this to
hope that the Sphinx build will be happy.

21 months agoDisallow dereferencing of void* in C++.
Erich Keane [Tue, 4 Oct 2022 19:41:43 +0000 (12:41 -0700)]
Disallow dereferencing of void* in C++.

as Discussed:
https://discourse.llvm.org/t/rfc-can-we-stop-the-extension-to-allow-dereferencing-void-in-c/65708

There is no good reason to allow this when the other compilers all
reject this, and it messes with SFINAE/constraint checking.

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

21 months ago[mlir][Linalg] Retire LinalgStrategyTileAndFusePass and filter-based pattern.
Nicolas Vasilache [Mon, 10 Oct 2022 06:36:10 +0000 (23:36 -0700)]
[mlir][Linalg] Retire LinalgStrategyTileAndFusePass and filter-based pattern.

Context: https://discourse.llvm.org/t/psa-retire-linalg-filter-based-patterns/63785

In the process, also retire `tileConsumerAndFuseProducers` that is now replaced by `tileConsumerAndFuseProducerGreedilyUsingSCFForOp`.

Context: https://discourse.llvm.org/t/psa-retire-tileandfuselinalgops-method/63850

When performing this replacement, a change of behavior appeared: the older `tileConsumerAndFuseProducers` would split the parallel
and non-parallel dimensions automatically and perform a first level of tile-and-fuse on parallel dimensions only and then introduce a
second level of tiling-only on the reduction dimensions. The newer `tileConsumerAndFuseProducerGreedilyUsingSCFForOp` on the other hand
does not perform this breakdown. As a consequence, the transform specification is evolved to produce the same output.

Additionally, replace some uses of `unsigned` by `int64_t` where possible without pulling in larger interface changes (left for a future PR).

Context: https://www.youtube.com/watch?v=Puio5dly9N8

Lastly, tests that were performing tile and fuse and distribute on tensors are retired: the generated IR mixing scf.for, tensors and
distributed processor ids was racy at best ..

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

21 months ago[gn build] port bc839b4b4e27
Nico Weber [Mon, 10 Oct 2022 13:19:12 +0000 (09:19 -0400)]
[gn build] port bc839b4b4e27

21 months ago[InstCombine] fold udiv with common factor
Sanjay Patel [Mon, 10 Oct 2022 11:21:23 +0000 (07:21 -0400)]
[InstCombine] fold udiv with common factor

((X *nuw Y) >> Z) / X --> Y >> Z

https://alive2.llvm.org/ce/z/x3kKnq

This is similar to 6b869be8100d / 8da2fa856f1b, but I have
not found a signed equivalent, so it's just an unsigned
match for now.

21 months ago[InstCombine] add 'exact' to udiv test for more coverage; NFC
Sanjay Patel [Mon, 10 Oct 2022 11:08:38 +0000 (07:08 -0400)]
[InstCombine] add 'exact' to udiv test for more coverage; NFC

21 months ago[PhaseOrdering] add test for sdiv with common factor; NFC
Sanjay Patel [Mon, 10 Oct 2022 10:51:43 +0000 (06:51 -0400)]
[PhaseOrdering] add test for sdiv with common factor; NFC

issue #58137