- Dec 26, 2020
-
-
Nikita Popov authored
This allows us to handle assumes etc in the recursive isKnownNonZero() checks.
-
Kazu Hirata authored
-
- Dec 25, 2020
-
-
Nikita Popov authored
The dominating condition handling in isKnownNonZero() currently only takes into account conditions of the form "x != 0" or "x == 0". However, there are plenty of other conditions that imply non-zero, a common one being "x s> 0". Peculiarly, the handling for assumes was already dealing with more general non-zero-ness conditions, so this just reuses the same logic for the dominating condition case.
-
Nikita Popov authored
Check conditions that imply non-zero, even if they are not literally "x != 0". Using ctlz for testing, as explicit comparison might get folded by other reasoning.
-
Nikita Popov authored
This allows us to handle additional cases like assumes.
-
Nikita Popov authored
D71264 started using a context instruction in a computeKnownBits() call. However, if aliasing between two GEPs is checked, then the choice of context instruction will be different for alias(GEP1, GEP2) and alias(GEP2, GEP1), which is not supposed to happen. Resolve this by remembering which GEP a certain VarIndex belongs to, and use that as the context instruction. This makes the choice of context instruction predictable and symmetric. It should be noted that this choice of context instruction is non-optimal (just like the previous choice): The AA query result is only valid at points that are reachable from *both* instructions. Using either one of them is conservatively correct, but a larger context may also be valid to use. Differential Revision: https://reviews.llvm.org/D93183
-
Eugene Zhulenev authored
Depends On D93592 Add support for `async.execute` async value unwrapping operands: ``` %token = async.execute(%async_value as %unwrapped : !async.value<!my.type>) { ... async.yield } ``` Reviewed By: csigg Differential Revision: https://reviews.llvm.org/D93598 -
Eugene Zhulenev authored
1. Add new methods to Async runtime API to support yielding async values 2. Add lowering from `async.yield` with value payload to the new runtime API calls `async.value` lowering requires that payload type is convertible to LLVM and supported by `llvm.mlir.cast` (DialectCast) operation. Reviewed By: csigg Differential Revision: https://reviews.llvm.org/D93592
-
Praveen authored
OpenMP 4.5 - Variables that appear in expressions for statement function definitions may not appear in OpenMP Private, Firstprivate or Lastprivate clauses. Test case : omp-private03.f90 Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D93213 -
Georgii Rymar authored
This is similar to D93760. When something is wrong with the hash table header we dump its context as a raw data. Currently we have the calculation overflow issue and it is possible to bypass the validation we have (and crash). The patch fixes it. Differential revision: https://reviews.llvm.org/D93799
-
Georgii Rymar authored
It was discussed in D92545 that we might want to improve messages reported when something is wrong with the stack size section. This patch does it. Differential revision: https://reviews.llvm.org/D93802
-
Georgii Rymar authored
This allows to get rid of lots for typedefs/usings from many places. Differential revision: https://reviews.llvm.org/D93801
-
Amara Emerson authored
No test for this because it's a CSE verifier failure that's only exposed in a WIP patch for enabling CSE throughout the AArch64 GISel pipeline.
-
Zakk Chen authored
Define vpopc/vfirst intrinsics and lower to V instructions. We work with @rogfer01 from BSC to come out this patch. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D93795
-
Kazu Hirata authored
-
Zakk Chen authored
Define vector mask-register logical intrinsics and lower them to V instructions. Also define pseudo instructions vmmv.m and vmnot.m. We work with @rogfer01 from BSC to come out this patch. Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Zakk Chen <zakk.chen@sifive.com> Differential Revision: https://reviews.llvm.org/D93705
-
ShihPo Hung authored
This patch defines vrgather intrinsics and lower to V instructions. We work with @rogfer01 from BSC to come out this patch. Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
ShihPo Hung <shihpo.hung@sifive.com> Differential revision: https://reviews.llvm.org/D93797
-
Monk Chiang authored
integer group: vredsum/vredmaxu/vredmax/vredminu/vredmin/vredand/vredor/vredxor float group: vfredosum/vfredsum/vfredmax/vfredmin We work with @rogfer01 from BSC to come out this patch. Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Zakk Chen <zakk.chen@sifive.com> Differential Revision: https://reviews.llvm.org/D93746
-
Roman Lebedev authored
[LoopIdiom] 'left-shift-until-bittest': keep no-wrap flags on shift, fix edge-case miscompilation for %x.next While `%x.curr` is always safe to compute, because `LoopBackedgeTakenCount` will always be smaller than `bitwidth(X)`, i.e. we never get poison, rewriting `%x.next` is more complicated, however, because `X << LoopTripCount` will be poison iff `LoopTripCount == bitwidth(X)` (which will happen iff `BitPos` is `bitwidth(x) - 1` and `X` is `1`). So unless we know that isn't the case (as alive2 notes, we know it's safe to do iff shift had no-wrap flags, or bitpos does not indicate signbit, or we know that %x is never `1`), we'll need to emit an alternative, safe IR, by either just shifting the `%x.curr`, or conditionally selecting between the computed `%x.next` and `0`.. Former IR looks better so let's do that. While there, ensure that we don't drop no-wrap flags from said shift.
-
Roman Lebedev authored
In particular, add tests with no-wrap flags on shift, a test where %x is not `1`, and ensure that tests where %bit is a constant bitwidth-1, or is not a constant bitwidth-1 test both liveout values.
-
Roman Lebedev authored
This is one of the deficiencies that can be observed in https://godbolt.org/z/YPczsG after D91038 patch set. This exposed two missing folds, one was fixed by the previous commit, another one is `(A ^ B) | ~(A ^ B) --> -1` / `(A ^ B) & ~(A ^ B) --> 0`. `-early-cse` will catch it: https://godbolt.org/z/4n1T1v, but isn't meaningful to fix it in InstCombine, because we'd need to essentially do our own CSE, and we can't even rely on `Instruction::isIdenticalTo()`, because there are no guarantees that the order of operands matches. So let's just accept it as a loss.
-
Roman Lebedev authored
-
Roman Lebedev authored
``` ---------------------------------------- define i32 @and_xor_not_common_op(i32 %a, i32 %b) { %0: %b2 = xor i32 %b, 4294967295 %t2 = xor i32 %a, %b2 %t4 = and i32 %t2, %a ret i32 %t4 } => define i32 @and_xor_not_common_op(i32 %a, i32 %b) { %0: %t4 = and i32 %a, %b ret i32 %t4 } Transformation seems to be correct! ``` -
Roman Lebedev authored
... which is a variation of `a & (a ^ ~b)` --> a & b`. A follow-up patch exposes this missing fold, so we need to fix it first.
-
Roman Lebedev authored
-
Roman Lebedev authored
A pattern to ignore ConstantExpr's is quite common, since they frequently lead into infinite combine loops, so let's make writing it easier.
-
Roman Lebedev authored
Thanks to Luke Benes for pointing it out.
-
Kazu Hirata authored
The last use of the function was removed on Sep 13, 2010 in commit 1094c802.
-
Kazu Hirata authored
-
- Dec 24, 2020
-
-
Simon Pilgrim authored
Replace the local compute*SignedMinMaxValuesFromKnownBits methods with the equivalent KnownBits helpers to determine the min/max value ranges.
-
Simon Pilgrim authored
Add unit test coverage - a followup will update InstCombineCompares.cpp to use this and could be used by D86578 as well.
-
Simon Pilgrim authored
Update the comment to make this clear, following the same approach as APInt.
-
Evgeniy Brevnov authored
Make test case x86 specific. Reviewed By: xbolva00 Differential Revision: https://reviews.llvm.org/D93803
-
Nikita Popov authored
This reverts commit 899faa50. Upon further consideration, this does not fix the right issue. Doing this fold for non-inbounds GEPs is legal, because the resulting pointer is still based-on null, which has no associated address range, and as such and access to it is UB. https://bugs.llvm.org/show_bug.cgi?id=48577#c3
-
Evgeniy Brevnov authored
Currently 'resume' is lowered to _Unwind_Resume with out "noreturn" attribute. Semantically _Unwind_Resume library call is expected to never return and should be marked as such. Though I didn't find any changes in behavior of existing tests there will be a difference once https://reviews.llvm.org/D79485 lands. I was not able to come up with the test case anything better than just checking for presence of "noreturn" attribute. Please let me know if there is a better way to test the change. Reviewed By: xbolva00 Differential Revision: https://reviews.llvm.org/D93682
-
Praveen Velliengiri authored
Currently, the compiler crashes in instruction selection of global load/stores in gfx600 due to the lack of FLAT instructions. This patch fix the crash by selecting MUBUF instructions for global load/stores in gfx600. Authored-by:
Praveen Velliengiri <Praveen.Velliengiri@amd.com> Reviewed by: t-tye Differential revision: https://reviews.llvm.org/D92483
-
Nikita Popov authored
This reverts commit eb79fd3c. This causes stage2 crashes, possibly due to StringMap being miscompiled. Reverting for now.
-
Georgii Rymar authored
When something is wrong with the GNU hash table header we dump its context as a raw data. Currently we have the calculation overflow issue and it is possible to bypass the validation we have (and crash). The patch fixes it. Differential revision: https://reviews.llvm.org/D93760
-
Kazu Hirata authored
The function was introduced without a user on Jan 3, 2011 in commit 0f87ca77. We still don't have a user yet.
-
Kazu Hirata authored
-