- Apr 12, 2021
-
-
Jim Lin authored
Reviewed By: Jim Differential Revision: https://reviews.llvm.org/D71541
-
Jim Lin authored
The current variable name isn't used anywhere else, which indicates it's a typo. Let's fix it before someone copy+pastes it somewhere else. Reviewed By: Jim Differential Revision: https://reviews.llvm.org/D39157
-
Bing1 Yu authored
Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D99244
-
Evgeniy Brevnov authored
Say we have %1=min(%a,%b) %2=min(%b,%c) %3=min(%2,%a) The optimization will try to reassociate the later one so that we can rewrite it to %3=min(%1, %c) and remove %2. But if %2 has another uses outside of %3 then we can't remove %2 and end up with: %1=min(%a,%b) %2=min(%b,%c) %3=min(%1, %c) This doesn't harm by itself except it is not profitable and changes IR for no good reason. What is bad it triggers next iteration which finds out that optimization is applicable to %2 and %3 and generates: %1=min(%a,%b) %2=min(%b,%c) %3=min(%1,%c) %4=min(%2,%a) and so on... The solution is to prevent optimization in the first place if intermediate result (%2) has side uses and known to be not removed. Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D100170
-
Freddy Ye authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D100279
-
Jez Ng authored
-
Chen Zheng authored
This resolves https://bugs.llvm.org/show_bug.cgi?id=49872 Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D100015
-
yifeng.dongyifeng authored
[Clang][Coroutine][DebugInfo] In c++ coroutine, clang will emit different debug info variables for parameters and move-parameters. The first one is the real parameters of the coroutine function, the other one just for copying parameters to the coroutine frame. Considering the following c++ code: ``` struct coro { ... }; coro foo(struct test & t) { ... co_await suspend_always(); ... co_await suspend_always(); ... co_await suspend_always(); } int main(int argc, char *argv[]) { auto c = foo(...); c.handle.resume(); ... } ``` Function foo is the standard coroutine function, and it has only one parameter named t (ignoring this at first), when we use the llvm code to compile this function, we can get the following ir: ``` !2921 = distinct !DISubprogram(name: "foo", linkageName: "_ZN6Object3fooE4test", scope: !2211, file: !45, li\ ne: 48, type: !2329, scopeLine: 48, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefi\ nition | DISPFlagOptimized, unit: !44, declaration: !2328, retainedNodes: !2922) !2924 = !DILocalVariable(name: "t", arg: 2, scope: !2921, file: !45, line: 48, type: !838) ... !2926 = !DILocalVariable(name: "t", scope: !2921, type: !838, flags: DIFlagArtificial) ``` We can find there are two `the same` DIVariable named t in the same dwarf scope for foo.resume. And when we try to use llvm-dwarfdump to dump the dwarf info of this elf, we get the following output: ``` 0x00006684: DW_TAG_subprogram DW_AT_low_pc (0x00000000004013a0) DW_AT_high_pc (0x00000000004013a8) DW_AT_frame_base (DW_OP_reg7 RSP) DW_AT_object_pointer (0x0000669c) DW_AT_GNU_all_call_sites (true) DW_AT_specification (0x00005b5c "_ZN6Object3fooE4test") 0x000066a5: DW_TAG_formal_parameter DW_AT_name ("t") DW_AT_decl_file ("/disk1/yifeng.dongyifeng/my_code/llvm/build/bin/coro-debug-1.cpp") DW_AT_decl_line (48) DW_AT_type (0x00004146 "test") 0x000066ba: DW_TAG_variable DW_AT_name ("t") DW_AT_type (0x00004146 "test") DW_AT_artificial (true) ``` The elf also has two 't' in the same scope. But unluckily, it might let the debugger confused. And failed to print parameters for O0 or above. This patch will make coroutine parameters and move parameters use the same DIVar and try to fix the problems that I mentioned before. Test Plan: check-clang Reviewed By: aprantl, jmorse Differential Revision: https://reviews.llvm.org/D97533 -
Qiu Chaofan authored
XSCMPUQP is not available for pre-P9 subtargets. This patch will lower them into libcall for correct behavior on power7/power8. Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D92083
-
Zakk Chen authored
Support the following instructions. 1. Vector Slide Instructions 2. Vector Register Gather Instructions 3. Vector Compress Instruction Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Zakk Chen <zakk.chen@sifive.com> Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D100127
-
Zakk Chen authored
1. Redefine vpopc and vfirst IR intrinsic so it could adapt on clang tablegen generator which always appends a type for vl in IntrinsicType of clang codegen. 2. Remove `c` type transformer and add `u` and `l` for unsigned long and long type. Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Zakk Chen <zakk.chen@sifive.com> Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D100120
-
Zakk Chen authored
Support the following instructions. 1. Mask load and store 2. Vector Strided Instructions 3. Vector Indexed Store Instructions Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Zakk Chen <zakk.chen@sifive.com> Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D99965
-
Zakk Chen authored
Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Zakk Chen <zakk.chen@sifive.com> Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D99964
-
Zakk Chen authored
Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Zakk Chen <zakk.chen@sifive.com> Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D99963
-
Zakk Chen authored
Fix extension macro condition. Support below instructions: 1. Single-Width Floating-Point/Integer Type-Convert Instructions 2. Widening Floating-Point/Integer Type-Convert Instructions 3. Narrowing Floating-Point/Integer Type-Convert Instructions Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D99742
-
Zakk Chen authored
Support vfclass, vfmerge, vfrec7, vfrsqrt7, vfsqrt instructions. Reviewed By: craig.topper Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Zakk Chen <zakk.chen@sifive.com> Differential Revision: https://reviews.llvm.org/D99741
-
Zakk Chen authored
Support below instructions. 1. Vector Widening Floating-Point Add/Subtract Instructions 2. Vector Widening Floating-Point Multiply 3. Vector Single-Width Floating-Point Fused Multiply-Add Instructions 4. Vector Widening Floating-Point Fused Multiply-Add Instructions 5. Vector Floating-Point Compare Instructions Reviewed By: craig.topper, HsiangKai Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Zakk Chen <zakk.chen@sifive.com> Differential Revision: https://reviews.llvm.org/D99669
-
Zakk Chen authored
Support the following instructions which have the same class. 1. Vector Single-Width Floating-Point Subtract Instructions 2. Vector Single-Width Floating-Point Multiply/Divide Instructions 3. Vector Floating-Point MIN/MAX Instructions 4. Vector Floating-Point Sign-Injection Instructions Reviewed By: craig.topper Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Zakk Chen <zakk.chen@sifive.com> Differential Revision: https://reviews.llvm.org/D99668
-
Zakk Chen authored
Reviewed By: craig.topper Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Zakk Chen <zakk.chen@sifive.com> Differential Revision: https://reviews.llvm.org/D99526
-
Jim Lin authored
Customized SDNode has been specified the explict XLenVT type. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D100190
-
Craig Topper authored
According to the 0.10 spec, VLEN is at least 128 bits and is a power of 2.
-
Craig Topper authored
We don't need the sign extending behavior here and SLLI/SRLI are able to compress to C.SLLI/C.SRLI.
-
Roman Lebedev authored
Same as with previous patches.
-
Roman Lebedev authored
Same as with previous patches.
-
Roman Lebedev authored
Same as with TryToSimplifyUncondBranchFromEmptyBlock()/MergeBlockIntoPredecessor() patch.
-
Roman Lebedev authored
Same as with TryToSimplifyUncondBranchFromEmptyBlock() patch.
-
Roman Lebedev authored
First, we don't need vector-ness for the predecessor lists. Secondly, like elsewhere, do insertions before deletions. Lastly, the check that we actually need to insert an edge, that it doesn't exist already, is backwards. Instead of looking at successors of every single 'PredOfBB', just always look at predecessors of the 'Succ'. The result is always the same, but we avoid *really* inefficient code.
-
Roman Lebedev authored
While, indeed, we may end up pushing less updates that we'd reserve space for, self-dominating updates aren't often enough for that to matter. But this should matter for normal updates.
-
Florian Hahn authored
Add test case to illustrate over-eager unrolling on AArch64, due to the cost-model not estimating the size of vector loads/stores accurately.
-
Florian Hahn authored
Add tests where scalarizing a vector load + extract is profitable.
-
Simon Pilgrim authored
[X86][AVX512] Fold not(kmov(x)) -> kmov(not(x)) and not(widen_subvector(x)) -> widen_subvector(not(x)) Improve AVX512 mask inversion, rG38c799bc exposed some missing opportunities to move scalar not() back onto the boolvector types for folding with setcc etc.
-
Thomas Lively authored
In the final SIMD spec, there is only a single v128.any_true instruction, rather than one for each lane interpretation because the semantics do not depend on the lane interpretation. Differential Revision: https://reviews.llvm.org/D100241
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Followup to D100177, handle an similar (demorgan inverse style) case from PR47797 as well The AVX512 test cases could be further improved if we folded not(iX bitcast(vXi1)) -> (iX bitcast(not(vXi1))) Alive2: https://alive2.llvm.org/ce/z/AnA_-W
-
Craig Topper authored
The first source has the same EEW as the destination and the other source is a scalar so the overlap constraints don't apply to the unmasked version. For the masked version we have a constraint that the destination can't be V0 so that covers the only overlap issue there. Reviewed By: khchen Differential Revision: https://reviews.llvm.org/D100217
-
Craig Topper authored
Similar to what we do for zext.w. Disable the (srl (and X, 0xffff), C) custom isel when zext.h is available.
-
Craig Topper authored
These require the input to be zero or sign extended. If we have sext.b, sext.h or zext.h instructions we can use them. Otherwise we need to use a pair of shifts to accomplish the zero/sign extend and the final shift. We don't currently use zext.h when it is available.
-
- Apr 11, 2021
-
-
-
Roman Lebedev authored
-
-