#
769b9799 |
| 02-Jul-2020 |
Simon Pilgrim <llvm-dev@redking.me.uk> |
[InstCombine] Add (vXi1 trunc(lshr(x,c))) -> icmp_eq(and(x,c')) support for non-uniform vectors
As noted on PR46531, we were only performing this transform on uniform vectors as we were using the m_
[InstCombine] Add (vXi1 trunc(lshr(x,c))) -> icmp_eq(and(x,c')) support for non-uniform vectors
As noted on PR46531, we were only performing this transform on uniform vectors as we were using the m_APInt pattern matcher to extract the shift amount.
Differential Revision: https://reviews.llvm.org/D83035
show more ...
|
#
8dbafd24 |
| 02-Jul-2020 |
Guillaume Chatelet <gchatelet@google.com> |
[Alignment][NFC] Transition and simplify calls to DL::getABITypeAlignment
This patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/
[Alignment][NFC] Transition and simplify calls to DL::getABITypeAlignment
This patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Differential Revision: https://reviews.llvm.org/D82977
show more ...
|
#
381054a9 |
| 24-Jun-2020 |
Roman Lebedev <lebedev.ri@gmail.com> |
[InstCombine] visitBitCast(): do not crash on weird `bitcast <1 x i8*> to i8*`
Even if we know that RHS of a bitcast is a pointer, we can't assume LHS is, because it might be a single-element vector
[InstCombine] visitBitCast(): do not crash on weird `bitcast <1 x i8*> to i8*`
Even if we know that RHS of a bitcast is a pointer, we can't assume LHS is, because it might be a single-element vector of pointer.
show more ...
|
#
d50366d2 |
| 08-Jun-2020 |
Sanjay Patel <spatel@rotateright.com> |
[InstCombine] improve matching for sext-lshr-trunc patterns, part 2
Similar to rG42f488b63a04
This is intended to preserve the logic of the existing transform, but remove unnecessary restrictions o
[InstCombine] improve matching for sext-lshr-trunc patterns, part 2
Similar to rG42f488b63a04
This is intended to preserve the logic of the existing transform, but remove unnecessary restrictions on uses and types.
https://rise4fun.com/Alive/oS0
Name: narrow input Pre: C1 <= width(C1) - 24 %B = sext i8 %A %C = lshr %B, C1 %r = trunc %C to i24 => %s = ashr i8 %A, trunc(umin(C1, 7)) %r = sext i8 %s to i24
Name: wide input Pre: C1 <= width(C1) - 24 %B = sext i24 %A %C = lshr %B, C1 %r = trunc %C to i8 => %s = ashr i24 %A, trunc(umin(C1, 23)) %r = trunc i24 %s to i8
show more ...
|
#
42f488b6 |
| 08-Jun-2020 |
Sanjay Patel <spatel@rotateright.com> |
[InstCombine] improve matching for sext-lshr-trunc patterns
This is intended to preserve the logic of the existing transform, but remove unnecessary restrictions on uses and types.
https://rise4fun
[InstCombine] improve matching for sext-lshr-trunc patterns
This is intended to preserve the logic of the existing transform, but remove unnecessary restrictions on uses and types.
https://rise4fun.com/Alive/pYfR
Pre: C1 <= width(C1) - 8 %B = sext i8 %A %C = lshr %B, C1 %r = trunc %C to i8 => %r = ashr i8 %A, trunc(umin(C1, 7))
show more ...
|
#
af7587d7 |
| 08-Jun-2020 |
Sanjay Patel <spatel@rotateright.com> |
[InstCombine] reduce code duplication in visitTrunc(); NFC
|
#
8f8029b4 |
| 29-May-2020 |
Christopher Tetreault <ctetreau@quicinc.com> |
[SVE] Eliminate calls to default-false VectorType::get() from InstCombine
Reviewers: efriedma, david-arm, fpetrogalli, spatel
Reviewed By: david-arm
Subscribers: tschuett, hiraditya, rkruppe, psno
[SVE] Eliminate calls to default-false VectorType::get() from InstCombine
Reviewers: efriedma, david-arm, fpetrogalli, spatel
Reviewed By: david-arm
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80334
show more ...
|
#
f254f1d9 |
| 26-May-2020 |
David Sherwood <david.sherwood@arm.com> |
[SVE] Remove getNumElements() warnings in InstCombiner::visitBitCast
Whilst trying to compile this test to assembly:
CodeGen/aarch64-sve-intrinsics/acle_sve_reinterpret.c
I discovered some warni
[SVE] Remove getNumElements() warnings in InstCombiner::visitBitCast
Whilst trying to compile this test to assembly:
CodeGen/aarch64-sve-intrinsics/acle_sve_reinterpret.c
I discovered some warnings were firing in InstCombiner::visitBitCast due to calls to getNumElements() for scalable vector types. These calls only really made sense for fixed width vectors so I have fixed up the code appropriately.
Differential Revision: https://reviews.llvm.org/D80559
show more ...
|
#
4d20e31f |
| 26-May-2020 |
Serge Pavlov <sepavloff@gmail.com> |
[FPEnv] Intrinsic llvm.roundeven
This intrinsic implements IEEE-754 operation roundToIntegralTiesToEven, and performs rounding to the nearest integer value, rounding halfway cases to even. The intri
[FPEnv] Intrinsic llvm.roundeven
This intrinsic implements IEEE-754 operation roundToIntegralTiesToEven, and performs rounding to the nearest integer value, rounding halfway cases to even. The intrinsic represents the missed case of IEEE-754 rounding operations and now llvm provides full support of the rounding operations defined by the standard.
Differential Revision: https://reviews.llvm.org/D75670
show more ...
|
#
c048a02b |
| 24-May-2020 |
Sanjay Patel <spatel@rotateright.com> |
[InstCombine] fold FP trunc into exact itofp
Similar to D79116 and rGbfd512160fe0 - if the 1st cast is exact, then we can go directly to the destination type because there is no double-rounding.
|
#
7eed772a |
| 23-May-2020 |
Sanjay Patel <spatel@rotateright.com> |
[PatternMatch] abbreviate vector inst matchers; NFC
Readability is not reduced with these opcodes/match lines, so reduce odds of awkward wrapping from 80-col limit.
|
Revision tags: llvmorg-10.0.1-rc1 |
|
#
bfd51216 |
| 17-May-2020 |
Sanjay Patel <spatel@rotateright.com> |
[InstCombine] improve analysis of FP->int->FP to eliminate fpextend
This was originally in D79116. Converting from a narrow-enough FP source value to integer and back to FP guarantees that the conve
[InstCombine] improve analysis of FP->int->FP to eliminate fpextend
This was originally in D79116. Converting from a narrow-enough FP source value to integer and back to FP guarantees that the conversion to FP is exact because of UB/poison-on-overflow.
This was suggested in PR36617: https://bugs.llvm.org/show_bug.cgi?id=36617#c19
show more ...
|
#
4f04db4b |
| 15-May-2020 |
Eli Friedman <efriedma@quicinc.com> |
AllocaInst should store Align instead of MaybeAlign.
Along the lines of D77454 and D79968. Unlike loads and stores, the default alignment is getPrefTypeAlign, to match the existing handling in vari
AllocaInst should store Align instead of MaybeAlign.
Along the lines of D77454 and D79968. Unlike loads and stores, the default alignment is getPrefTypeAlign, to match the existing handling in various places, including SelectionDAG and InstCombine.
Differential Revision: https://reviews.llvm.org/D80044
show more ...
|
#
a62533c2 |
| 10-May-2020 |
Sanjay Patel <spatel@rotateright.com> |
[InstCombine] fold fpext into exact integer-to-FP cast
We can combine a floating-point extension cast with a conversion from integer if we know the earlier cast is exact.
This is an optimization su
[InstCombine] fold fpext into exact integer-to-FP cast
We can combine a floating-point extension cast with a conversion from integer if we know the earlier cast is exact.
This is an optimization suggested in PR36617: https://bugs.llvm.org/show_bug.cgi?id=36617#c19
However, this patch does not change the example suggested there. This patch only uses the existing analysis to handle cases where the integer source value magnitude is narrower than the intermediate FP mantissa (guarantees that the conversion to FP is exact). Follow-up patches to the analysis function can enable more cases.
Differential Revision: https://reviews.llvm.org/D79116
show more ...
|
#
46d6f76b |
| 08-May-2020 |
Sanjay Patel <spatel@rotateright.com> |
[InstCombine] fix typo in comment; NFC
|
#
5cf17034 |
| 08-May-2020 |
Sanjay Patel <spatel@rotateright.com> |
[InstCombine] add helper for known exact cast to FP; NFC
As suggested in D79116 - there's shared logic between the existing code and potential new folds. This could go in ValueTracking if it seems g
[InstCombine] add helper for known exact cast to FP; NFC
As suggested in D79116 - there's shared logic between the existing code and potential new folds. This could go in ValueTracking if it seems generally useful.
show more ...
|
#
ff9045dc |
| 08-May-2020 |
Sanjay Patel <spatel@rotateright.com> |
[InstCombine] clean up foldItoFPtoI; NFC
Mostly cosmetic improvements to variable names and logic to ease refactoring suggested in D79116.
|
#
09d70e05 |
| 08-May-2020 |
Sanjay Patel <spatel@rotateright.com> |
[InstCombine] simplify code for FP to integer casts; NFCI
FoldIToFPtoI() returns immediately if the operand is not an opposite cast instruction, so the extra checks in the callers are redundant.
|
#
2058c987 |
| 06-May-2020 |
Sanjay Patel <spatel@rotateright.com> |
[InstCombine] limit bitcast+insertelement transform to x86 MMX type
This is unusual for the general case because we are replacing 1 instruction with 2.
Splitting from a potential conflicting transf
[InstCombine] limit bitcast+insertelement transform to x86 MMX type
This is unusual for the general case because we are replacing 1 instruction with 2.
Splitting from a potential conflicting transform in D79171
show more ...
|
#
cc035d47 |
| 15-Apr-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
Upgrade users of 'new ShuffleVectorInst' to pass indices as an int array
No functionality change intended.
|
#
155740cc |
| 08-Apr-2020 |
Christopher Tetreault <ctetreau@quicinc.com> |
Clean up usages of asserting vector getters in Type
Summary: Remove usages of asserting vector getters in Type in preparation for the VectorType refactor. The existence of these functions complicate
Clean up usages of asserting vector getters in Type
Summary: Remove usages of asserting vector getters in Type in preparation for the VectorType refactor. The existence of these functions complicates the refactor while adding little value.
Reviewers: sdesmalen, rriddle, efriedma
Reviewed By: sdesmalen
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77263
show more ...
|
#
1ee6ec2b |
| 31-Mar-2020 |
Eli Friedman <efriedma@quicinc.com> |
Remove "mask" operand from shufflevector.
Instead, represent the mask as out-of-line data in the instruction. This should be more efficient in the places that currently use getShuffleVector(), and p
Remove "mask" operand from shufflevector.
Instead, represent the mask as out-of-line data in the instruction. This should be more efficient in the places that currently use getShuffleVector(), and paves the way for further changes to add new shuffles for scalable vectors.
This doesn't change the syntax in textual IR. And I don't currently plan to change the bitcode encoding in this patch, although we'll probably need to do something once we extend shufflevector for scalable types.
I expect that once this is finished, we can then replace the raw "mask" with something more appropriate for scalable vectors. Not sure exactly what this looks like at the moment, but there are a few different ways we could handle it. Maybe we could try to describe specific shuffles. Or maybe we could define it in terms of a function to convert a fixed-length array into an appropriate scalable vector, using a "step", or something like that.
Differential Revision: https://reviews.llvm.org/D72467
show more ...
|
#
19df7fa8 |
| 30-Mar-2020 |
Nikita Popov <nikita.ppv@gmail.com> |
[InstCombine] Erase old alloca in cast of alloca transform
As we don't return the replaceInstUsesWith() result, we are responsible for erasing the instruction.
NFC apart from worklist order.
|
#
464b9aea |
| 29-Mar-2020 |
Daan Sprenkels <daan@dsprenkels.com> |
[InstCombine] Transform extelt-trunc -> bitcast-extelt
Canonicalize the case when a scalar extracted from a vector is truncated. Transform such cases to bitcast-then-extractelement. This will enabl
[InstCombine] Transform extelt-trunc -> bitcast-extelt
Canonicalize the case when a scalar extracted from a vector is truncated. Transform such cases to bitcast-then-extractelement. This will enable erasing the truncate operation.
This commit fixes PR45314.
reviewers: spatel
Differential revision: https://reviews.llvm.org/D76983
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
#
e24e95fe |
| 03-Mar-2020 |
Eli Friedman <efriedma@quicinc.com> |
Remove CompositeType class.
The existence of the class is more confusing than helpful, I think; the commonality is mostly just "GEP is legal", which can be queried using APIs on GetElementPtrInst.
Remove CompositeType class.
The existence of the class is more confusing than helpful, I think; the commonality is mostly just "GEP is legal", which can be queried using APIs on GetElementPtrInst.
Differential Revision: https://reviews.llvm.org/D75660
show more ...
|