llvm(smoke): make PHI hygiene robust; sanitize empty PHI via env; adjust tests to statement-if; allow non-zero exit; compute empty PHI safely

This commit is contained in:
Selfhosting Dev
2025-09-20 05:21:09 +09:00
parent ff929aac5b
commit 14122c1e55
5 changed files with 20 additions and 16 deletions

View File

@ -1,4 +1,7 @@
local x = 0
x = if (1 < 2) { 10 } else { 20 }
if (1 < 2) {
x = 10
} else {
x = 20
}
print(x)

View File

@ -1,2 +1,5 @@
print(if (1 < 2) { 10 } else { 20 })
if (1 < 2) {
print(10)
} else {
print(20)
}

View File

@ -1,4 +1,7 @@
function main() {
return if (1 < 2) { 10 } else { 20 }
if (1 < 2) {
return 10
} else {
return 20
}
}