8000 fix equal-type floating-point resize selection by can-lehmann · Pull Request #139 · can-lehmann/metajit.cpp · GitHub
[go: up one dir, main page]

Skip to content

fix equal-type floating-point resize selection - #139

Merged
can-lehmann merged 1 commit into
mainfrom
can-resizef-identity
Oct 26, 2026
Merged

can-lehmann merged 1 commit into
mainfrom
can-resizef-identity

Conversation

@can-lehmann
Copy link
Copy Markdown
Owner

No description provided.

@github-actions
Copy link
Copy Markdown

Coverage

File Lines Functions Branches
genext.hpp 🟡 71.23% 🟡 86.89% 🟡 72.56%
jitir.hpp 🟡 72.72% 🟡 79.08% 🟡 71.58%
jitir_llvmapi.hpp 🔴 54.74% 🟡 80.00% 🔴 50.00%
llvmgen.hpp 🟢 90.72% 🟢 90.00% 🟡 81.82%
lowerllvm.hpp 🔴 69.57% 🟡 87.50% 🔴 50.49%
x86gen.hpp 🟢 90.23% 🟡 86.93% 🟡 84.66%
x86insts.inc.hpp 🟡 84.66% - -
TOTAL 🟡 74.73% 🟡 80.94% 🟡 76.21%
Diff Coverage

Diff Coverage

Diff: origin/main...HEAD, staged and unstaged changes

  • x86gen.hpp (77.8%): Missing lines 983,989

Summary

  • Total: 9 lines
  • Missing: 2 lines
  • Coverage: 77%

x86gen.hpp

Lines 979-987

  979       } else if (dynmatch(ResizeXInst, resize_x, inst)) {
  980         _builder.mov64(vreg(inst), vreg(resize_x->arg(0)));
  981       } else if (dynmatch(ResizeFInst, resize_f, inst)) {
  982         if (resize_f->type() == resize_f->arg(0)->type()) {
! 983           move(vreg(inst), vreg(resize_f->arg(0)));
  984         } else {
  985           switch (resize_f->type()) {
  986             case Type::Float32: _builder.cvtsd2ss(vreg(inst), vreg(resize_f->arg(0))); break;
  987             case Type::Float64: _builder.cvtss2sd(vreg(inst), vreg(resize_f->arg(0))); break;

Lines 985-993

  985           switch (resize_f->type()) {
  986             case Type::Float32: _builder.cvtsd2ss(vreg(inst), vreg(resize_f->arg(0))); break;
  987             case Type::Float64: _builder.cvtss2sd(vreg(inst), vreg(resize_f->arg(0))); break;
  988             default:
! 989               assert(false && "Unsupported resize_f type");
  990           }
  991         }
  992       } else if (dynmatch(IntToFloatSInst, int_to_float_s, inst)) {
  993         Reg src = vreg();

@can-lehmann
can-lehmann merged commit e97a921 into main Oct 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0