1 Star 0 Fork 5

yelvens/luajit_anolis

forked from src-anolis-os/luajit 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0019-Fix-FOLD-rule-for-strength-reduction-of-widening.patch 844 Bytes
一键复制 编辑 原始数据 按行查看 历史
xingwei-liu 提交于 2022-07-28 14:43 . init package version for an8.6
From 9f0caad0e43f97a4613850b3874b851cb1bc301d Mon Sep 17 00:00:00 2001
From: Mike Pall <mike>
Date: Wed, 8 Nov 2017 12:53:05 +0100
Subject: [PATCH 19/72] Fix FOLD rule for strength reduction of widening.
Reported by Matthew Burk.
---
src/lj_opt_fold.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c
index 3d0e35a..5dc7ae3 100644
--- a/src/lj_opt_fold.c
+++ b/src/lj_opt_fold.c
@@ -1052,7 +1052,7 @@ LJFOLDF(simplify_conv_sext)
if (ref == J->scev.idx) {
IRRef lo = J->scev.dir ? J->scev.start : J->scev.stop;
lua_assert(irt_isint(J->scev.t));
- if (lo && IR(lo)->i + ofs >= 0) {
+ if (lo && IR(lo)->o == IR_KINT && IR(lo)->i + ofs >= 0) {
ok_reduce:
#if LJ_TARGET_X64
/* Eliminate widening. All 32 bit ops do an implicit zero-extension. */
--
2.20.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ihuang77/luajit_anolis.git
git@gitee.com:ihuang77/luajit_anolis.git
ihuang77
luajit_anolis
luajit_anolis
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385