Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
runtime
提交
195a0a90
R
runtime
项目概览
dotNET Platform
/
runtime
11 个月 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
runtime
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
195a0a90
编写于
6月 16, 2022
作者:
S
SingleAccretion
提交者:
GitHub
6月 16, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tighten checks in `areArgumentsContiguous` (#70829)
* Tighten checks in "areArgumentsContiguous" * Add a test
上级
401722be
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
67 addition
and
1 deletion
+67
-1
src/coreclr/jit/simd.cpp
src/coreclr/jit/simd.cpp
+9
-1
src/tests/JIT/Regression/JitBlue/Runtime_70824/Runtime_70824.cs
...sts/JIT/Regression/JitBlue/Runtime_70824/Runtime_70824.cs
+48
-0
src/tests/JIT/Regression/JitBlue/Runtime_70824/Runtime_70824.csproj
...JIT/Regression/JitBlue/Runtime_70824/Runtime_70824.csproj
+10
-0
未找到文件。
src/coreclr/jit/simd.cpp
浏览文件 @
195a0a90
...
...
@@ -1685,7 +1685,15 @@ bool Compiler::areArrayElementsContiguous(GenTree* op1, GenTree* op2)
//
bool
Compiler
::
areArgumentsContiguous
(
GenTree
*
op1
,
GenTree
*
op2
)
{
if
(
op1
->
OperIs
(
GT_IND
)
&&
op2
->
OperIs
(
GT_IND
))
if
(
op1
->
TypeGet
()
!=
op2
->
TypeGet
())
{
return
false
;
}
assert
(
!
op1
->
TypeIs
(
TYP_STRUCT
));
if
(
op1
->
OperIs
(
GT_IND
)
&&
op1
->
AsIndir
()
->
Addr
()
->
OperIs
(
GT_INDEX_ADDR
)
&&
op2
->
OperIs
(
GT_IND
)
&&
op2
->
AsIndir
()
->
Addr
()
->
OperIs
(
GT_INDEX_ADDR
))
{
return
areArrayElementsContiguous
(
op1
,
op2
);
}
...
...
src/tests/JIT/Regression/JitBlue/Runtime_70824/Runtime_70824.cs
0 → 100644
浏览文件 @
195a0a90
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using
System.Numerics
;
using
System.Runtime.CompilerServices
;
public
unsafe
class
Runtime_70824
{
public
static
int
Main
()
{
long
lng
=
2
;
float
flt
=
3
;
Vector2
vtor
=
new
Vector2
(
4
,
5
);
float
[]
arr
=
new
float
[]
{
6
,
7
};
if
(
ProblemWithTypes
(&
lng
,
&
flt
,
vtor
))
{
return
101
;
}
if
(
ProblemWithAddrs
(&
flt
,
arr
,
vtor
))
{
return
102
;
}
return
100
;
}
[
MethodImpl
(
MethodImplOptions
.
NoInlining
)]
private
static
bool
ProblemWithTypes
(
long
*
p1
,
float
*
pF
,
Vector2
vtor
)
{
*
pF
=
vtor
.
X
;
*
p1
=
(
long
)*
pF
;
return
*
p1
!=
(
long
)*
pF
;
}
[
MethodImpl
(
MethodImplOptions
.
NoInlining
)]
private
static
bool
ProblemWithAddrs
(
float
*
pF
,
float
[]
arr
,
Vector2
vtor
)
{
*
pF
=
vtor
.
X
;
arr
[
0
]
=
vtor
.
Y
;
arr
[
1
]
=
vtor
.
X
;
*
pF
=
vtor
.
Y
;
return
arr
[
0
]
!=
vtor
.
Y
||
*
pF
!=
vtor
.
Y
;
}
}
src/tests/JIT/Regression/JitBlue/Runtime_70824/Runtime_70824.csproj
0 → 100644
浏览文件 @
195a0a90
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<Optimize>True</Optimize>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>
</Project>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录