Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
7aca5dc
Initial work
TIHan Dec 16, 2021
2752913
Added a comma to display
TIHan Dec 16, 2021
526e6c8
Cleanup
TIHan Dec 16, 2021
d850426
Fixing build
TIHan Dec 17, 2021
0ee6450
More cleanup
TIHan Dec 17, 2021
cb5a82e
Update comment
TIHan Dec 17, 2021
6ae9a94
Update comment
TIHan Dec 17, 2021
5c1997f
Added CompareEqual Vector64/128 with Zero tests
TIHan Jan 4, 2022
b33c72c
Merge remote-tracking branch 'upstream/main' into vector-64-128-zero-…
TIHan Jan 4, 2022
fd19fdc
Do not contain op1 for now
TIHan Jan 4, 2022
178ff52
Wrong intrinsic id used
TIHan Jan 5, 2022
c0a23c0
Removing generated tests
TIHan Jan 6, 2022
ad780ea
Removing generated tests
TIHan Jan 6, 2022
83c26ab
Added CompareEqual tests
TIHan Jan 6, 2022
9f7e7da
Supporting containment for first operand
TIHan Jan 6, 2022
1e67415
Fix test build
TIHan Jan 6, 2022
25b9d92
Passing correct register
TIHan Jan 6, 2022
c0dc7e4
Check IsVectorZero before not allocing a register
TIHan Jan 7, 2022
a718944
Update comment
TIHan Jan 7, 2022
1f45fa2
Fixing test
TIHan Jan 7, 2022
cb872da
Minor format change
TIHan Jan 7, 2022
c0708d7
Fixed formatting
TIHan Jan 7, 2022
bf49d11
Renamed test
TIHan Jan 8, 2022
bc7a557
Adding AdvSimd_Arm64 tests:
TIHan Jan 10, 2022
5939f36
Adding support for rest of 'cmeq' and 'fcmeq' instructions
TIHan Jan 10, 2022
6cd0ea8
Removing github csproj
TIHan Jan 10, 2022
2b30421
Minor test fix
TIHan Jan 10, 2022
0828de6
Fixed tests
TIHan Jan 10, 2022
fa43d19
Fix print
TIHan Jan 10, 2022
911f929
Minor format change
TIHan Jan 10, 2022
b91be1e
Fixing test
TIHan Jan 11, 2022
760a08c
Initial commit for Vector.Create to Vector.Zero normalization
TIHan Jan 14, 2022
c1a90b4
Added some emitter tests
TIHan Jan 18, 2022
32f86c1
Feedback
TIHan Jan 19, 2022
b08f552
Update emitarm64.cpp
TIHan Jan 19, 2022
c89e47b
Feedback
TIHan Jan 19, 2022
956e50a
Merge branch 'vector-64-128-zero-arm64-opts1' of github.com:TIHan/run…
TIHan Jan 19, 2022
2b526c9
Merge remote-tracking branch 'upstream' into vector-64-128-zero-arm64…
TIHan Jan 19, 2022
d51a988
Merge branch 'vector-64-128-zero-arm64-opts1' into vector-64-128-256-…
TIHan Jan 19, 2022
77c3d25
Merge remote-tracking branch 'upstream' into vector-64-128-256-Create…
TIHan Jan 20, 2022
b1065e8
Handling variations of Vector.Create
TIHan Jan 20, 2022
451f8e3
Use Operands iterator instead of edges
TIHan Jan 20, 2022
e231131
Fix condition
TIHan Jan 20, 2022
64ad95f
Simplify
TIHan Jan 20, 2022
333fc67
format
TIHan Jan 20, 2022
bc02904
Fixed IsFloatPositiveZero
TIHan Jan 21, 2022
d8c39e3
Uncomment
TIHan Jan 21, 2022
a5e51d5
Merging
TIHan Jan 21, 2022
38d9e7e
Updated tests to include Vector64.Create/Vector128.Create for ARM64
TIHan Jan 21, 2022
fb6047c
Making implementation of IsFloatPositiveZero explicit
TIHan Jan 21, 2022
bc1b9f4
Update src/coreclr/jit/gentree.cpp
TIHan Jan 24, 2022
d7904b6
Feedback
TIHan Jan 24, 2022
dbe1990
Merged
TIHan Jan 24, 2022
5b7d991
Update comment
TIHan Jan 24, 2022
5a7f674
Update comment
TIHan Jan 24, 2022
377b794
Do not perform optimization when VN CSE phase
TIHan Jan 24, 2022
1cf0b32
use ResetHWIntrinsicId
TIHan Jan 25, 2022
84f51cd
Assert !optValnumCSE_phase
TIHan Jan 25, 2022
31cd50d
Simplify IsVectorZero
TIHan Jan 25, 2022
383f147
Simplify IsVectorZero
TIHan Jan 25, 2022
29fb977
Simplify some uses of Vector*_get_Zero
TIHan Jan 25, 2022
51eae5a
Added another test
TIHan Jan 25, 2022
7d06ebf
Fixed formatting
TIHan Jan 25, 2022
177cd53
Revert lowering removal
TIHan Jan 25, 2022
32ac1fc
Merge remote-tracking branch 'upstream/main' into vector-64-128-256-C…
TIHan Feb 7, 2022
feed738
Initial work for optimizations on VectorZero value numbering
TIHan Feb 8, 2022
9840c5b
Allowing all Vector.Zero to be constant prop'ed. Added VNFuncSimdType…
TIHan Feb 8, 2022
36c4001
Update gentree.h
TIHan Feb 8, 2022
fc28677
Merge branch 'vector-64-128-256-Create-to-get_Zero' into vec-zero-vn
TIHan Feb 8, 2022
b074f09
Quick rename
TIHan Feb 8, 2022
2331a6e
Removed extra variable
TIHan Feb 8, 2022
f0d1ecc
Added default case
TIHan Feb 8, 2022
b15036f
Format
TIHan Feb 8, 2022
d27d877
Fixed vnDumpSimdType to take into account CorInfoType
TIHan Feb 9, 2022
e48ad65
Fixed gtNewSimdZeroNode to produce the right Vector*_get_Zero based o…
TIHan Feb 9, 2022
da48e4e
Formatting
TIHan Feb 10, 2022
3785e34
Feedback and a loop test
TIHan Feb 11, 2022
2b108d2
Added another test. Formatting fixes
TIHan Feb 11, 2022
b1c44cf
Added GetSimdBaseJitPreciseType
TIHan Feb 11, 2022
014b09f
Feedback
TIHan Feb 11, 2022
bb58117
Minor fix
TIHan Feb 11, 2022
7aae73b
Minor comment update
TIHan Feb 11, 2022
423d25a
Added another comment
TIHan Feb 11, 2022
616bb9b
Added another comment
TIHan Feb 11, 2022
84d3a94
Added another comment
TIHan Feb 11, 2022
ac3b474
Update comment
TIHan Feb 11, 2022
2769740
Formatting
TIHan Feb 11, 2022
92df1fd
Merge remote-tracking branch 'upstream/main' into vec-zero-vn
TIHan Feb 13, 2022
4a6d9a2
Feedback
TIHan Feb 14, 2022
2d6f367
Fixing build
TIHan Feb 14, 2022
759e8c0
Feedback
TIHan Feb 16, 2022
4c0f768
Merge remote-tracking branch 'upstream/main' into vector-64-128-256-C…
TIHan Feb 17, 2022
1d7e408
Merge branch 'vector-64-128-256-Create-to-get_Zero' into vec-zero-vn
TIHan Feb 17, 2022
0bdb08d
Merging
TIHan Feb 17, 2022
4bd81c7
Update assertionprop.cpp
TIHan Feb 18, 2022
396e8a1
Formatting
TIHan Feb 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleanup
  • Loading branch information
TIHan committed Dec 16, 2021
commit 526e6c800e477c0ff223eb8130e9471035893bfd
2 changes: 1 addition & 1 deletion src/coreclr/jit/codegenlinear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,7 @@ void CodeGen::genConsumeRegs(GenTree* tree)
#ifdef FEATURE_SIMD
// (In)Equality operation that produces bool result, when compared
// against Vector zero, marks its Vector Zero operand as contained.
assert(tree->OperIsLeaf() || tree->IsSIMDZero() || tree->IsIntegralConstVector(0));
assert(tree->OperIsLeaf() || tree->IsSIMDZero());
#else
assert(tree->OperIsLeaf());
#endif
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17859,6 +17859,7 @@ bool GenTree::isContainableHWIntrinsic() const
#elif TARGET_ARM64
switch (AsHWIntrinsic()->GetHWIntrinsicId())
{
case NI_Vector64_get_Zero:
case NI_Vector128_get_Zero:
{
return true;
Expand Down
17 changes: 17 additions & 0 deletions src/coreclr/jit/gentree.h
Original file line number Diff line number Diff line change
Expand Up @@ -7712,6 +7712,23 @@ inline bool GenTree::IsSIMDZero() const
}
#endif

#ifdef FEATURE_HW_INTRINSICS
if (gtOper == GT_HWINTRINSIC)
{
const GenTreeHWIntrinsic* node = AsHWIntrinsic();

if (node->GetOperandCount() == 0)
{
const var_types simdBaseType = node->GetSimdBaseType();
if (varTypeIsIntegral(simdBaseType) || varTypeIsFloating(simdBaseType))
{
const NamedIntrinsic intrinsicId = node->GetHWIntrinsicId();
return (intrinsicId == NI_Vector64_get_Zero) || (intrinsicId == NI_Vector128_get_Zero);
}
}
}
#endif // FEATURE_HW_INTRINSICS

return false;
}

Expand Down
6 changes: 4 additions & 2 deletions src/coreclr/jit/hwintrinsiccodegenarm64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,11 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node)
}
else
{
if (intrin.id == NI_AdvSimd_CompareEqual && intrin.op2->isContained() &&
intrin.op2->IsIntegralConstVector(0))
if (intrin.op2->isContained())
{
assert(HWIntrinsicInfo::SupportsContainment(intrin.id));
assert(intrin.op2->IsSIMDZero());

GetEmitter()->emitIns_R_R(ins, emitSize, targetReg, op1Reg, opt);
}
else
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/jit/instrsarm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ INST4(neg, "neg", 0, IF_EN4G, 0x4B0003E0, 0x4B0003E0,
INST4(cmeq, "cmeq", 0, IF_EN4H, 0x7EE08C00, 0x2E208C00, 0x5E209800, 0x0E209800)
// cmeq Vd,Vn,Vm DV_3E 01111110111mmmmm 100011nnnnnddddd 7EE0 8C00 Vd,Vn,Vm (scalar)
// cmeq Vd,Vn,Vm DV_3A 0Q101110XX1mmmmm 100011nnnnnddddd 2E20 8C00 Vd,Vn,Vm (vector)
// cmeq Vd,Vn DV_2L 01011110XX100000 100110nnnnnddddd 5E20 9800 Vd,Vn (scalar)
// cmeq Vd,Vn DV_2M 0Q001110XX100000 100110nnnnnddddd 0E20 9800 Vd,Vn (vector)
// cmeq Vd,Vn DV_2L 01011110XX100000 100110nnnnnddddd 5E20 9800 Vd,Vn,#0 (scalar - with zero)
// cmeq Vd,Vn DV_2M 0Q001110XX100000 100110nnnnnddddd 0E20 9800 Vd,Vn,#0 (vector - with zero)

INST4(cmge, "cmge", 0, IF_EN4H, 0x5EE03C00, 0x0E203C00, 0x7E208800, 0x2E208800)
// cmge Vd,Vn,Vm DV_3E 01011110111mmmmm 001111nnnnnddddd 5EE0 3C00 Vd,Vn,Vm (scalar)
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/lowerarmarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1871,7 +1871,7 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node)

case NI_AdvSimd_CompareEqual:
{
if (intrin.op2->IsIntegralConstVector(0))
if (intrin.op2->IsSIMDZero())
{
MakeSrcContained(node, intrin.op2);
}
Expand Down
10 changes: 7 additions & 3 deletions src/coreclr/jit/lsraarm64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1101,10 +1101,14 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree)
}
}
}
else
else if (intrin.op2 != nullptr)
{
if (intrin.op2 != nullptr &&
!(intrin.id == NI_AdvSimd_CompareEqual && intrin.op2->IsIntegralConstVector(0) && intrin.op2->isContained()))
if (intrin.op2->isContained())
{
assert(HWIntrinsicInfo::SupportsContainment(intrin.id));
assert(intrin.op2->IsSIMDZero());
}
else
{
// RMW intrinsic operands doesn't have to be delayFree when they can be assigned the same register as op1Reg
// (i.e. a register that corresponds to read-modify-write operand) and one of them is the last use.
Expand Down