Logo
Explore Help
Register Sign In
tomoaki/hakorune
1
0
Fork 0
You've already forked hakorune
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
3f816407643815d63816a2628d0aefd9096ea1bb
hakorune/apps/tests/phase195_sum_count.hako

24 lines
484 B
Plaintext
Raw Normal View History

fix(joinir): Phase 196 Select double-remap bug in instruction_rewriter Root cause: PHI inputs were being remapped twice in instruction_rewriter.rs - Line 304: remap_instruction() already remapped JoinIR → Host ValueIds - Line 328: remap_value() attempted to remap again → undefined ValueIds Fix: Only remap block IDs, use already-remapped ValueIds as-is Test results: - phase195_sum_count.hako → 93 ✅ (multi-carrier P3) - loop_if_phi.hako → sum=9 ✅ (single-carrier P3) - loop_min_while.hako → 0,1,2 ✅ (Pattern 1) - joinir_min_loop.hako → RC:0 ✅ (Pattern 2) - No [joinir/freeze], no regressions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 14:45:04 +09:00
static box Main {
main() {
local i = 1
local sum = 0
local count = 0
loop(i <= 5) {
if(i % 2 == 1) {
sum = sum + i
count = count + 1
} else {
sum = sum + 0
count = count + 0
}
i = i + 1
}
// Expected: sum=9 (1+3+5), count=3
local result = sum * 10 + count // 93
print(result)
return 0
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.2 Page: 36ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API