ssa: fix defer move block[0] index
This commit is contained in:
10
cl/_testrt/nextblock/in.go
Normal file
10
cl/_testrt/nextblock/in.go
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
syms := []int{}
|
||||||
|
for range syms {
|
||||||
|
}
|
||||||
|
defer println("bye")
|
||||||
|
for range syms {
|
||||||
|
}
|
||||||
|
}
|
||||||
1
cl/_testrt/nextblock/out.ll
Normal file
1
cl/_testrt/nextblock/out.ll
Normal file
@@ -0,0 +1 @@
|
|||||||
|
;
|
||||||
@@ -86,6 +86,7 @@ const (
|
|||||||
func (p Function) deferInitBuilder() (b Builder, next BasicBlock) {
|
func (p Function) deferInitBuilder() (b Builder, next BasicBlock) {
|
||||||
b = p.NewBuilder()
|
b = p.NewBuilder()
|
||||||
next = b.setBlockMoveLast(p.blks[0])
|
next = b.setBlockMoveLast(p.blks[0])
|
||||||
|
p.blks[0].last = next.last
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user