llgo/ssa: PhisExpr

This commit is contained in:
xushiwei
2024-05-02 07:37:31 +08:00
parent be1599b418
commit 25b104cf13
4 changed files with 62 additions and 8 deletions

View File

@@ -400,7 +400,7 @@ func (p *context) compileInstrOrValue(b llssa.Builder, iv instrOrValue, asValue
for i, pred := range preds {
bblks[i] = p.fn.Block(pred.Index)
}
phi.AddIncoming(vals, bblks)
phi.AddIncoming(b, vals, bblks)
})
case *ssa.ChangeType:
t := v.Type()

View File

@@ -29,7 +29,7 @@ func testCompile(t *testing.T, src, expected string) {
}
func TestFromTestrt(t *testing.T) {
cltest.FromDir(t, "", "./_testrt", true)
cltest.FromDir(t, "concat", "./_testrt", true)
}
func TestFromTestdata(t *testing.T) {