Sean Stangl
b4c6bfd371
When splitting a const, insert prior to the terminal branch group. (#1325)
* When splitting a const, insert prior to the terminal branch group. Closes #1159
Given code like the following, on x86_64, which does not have i128 registers:
ebb0(v0: i64):
v1 = iconst.i128 0
v2 = icmp_imm eq v0, 1
brnz v2, ebb1
jump ebb2(v1)
It would be split to:
ebb0(v0: i64):
v1 = iconst.i128 0
v2 = icmp_imm eq v0, 1
brnz v2, ebb1
v3, v4 = isplit.i128 v1
jump ebb2(v3, v4)
But that fails basic-block invariants. This patch changes that to:
ebb0(v0: i64):
v1 = iconst.i128 0
v2 = icmp_imm eq v0, 1
v3, v4 = isplit.i128 v1
brnz v2, ebb1
jump ebb2(v3, v4)
* Add isplit-bb.clif testcase
2020-01-22 17:14:41 +01:00
..
2019-07-05 17:50:17 +02:00
2019-10-31 09:35:08 -07:00
2020-01-06 15:33:22 -08:00
2019-10-24 17:20:12 -07:00
2020-01-17 12:11:54 -08:00
2019-10-24 17:20:12 -07:00
2020-01-10 08:38:40 -08:00
2020-01-13 10:32:55 -06:00
2019-10-24 17:20:12 -07:00
2019-01-28 15:56:54 -08:00
2019-10-24 17:20:12 -07:00
2019-10-24 17:20:12 -07:00
2019-11-27 18:41:37 -05:00
2020-01-22 17:14:41 +01:00
2020-01-13 14:42:49 -07:00
2019-01-28 15:56:54 -08:00
2019-11-18 10:18:38 -08:00
2019-10-24 17:20:12 -07:00
2019-10-24 17:20:12 -07:00
2019-11-05 14:36:03 -08:00
2019-01-28 15:56:54 -08:00
2019-10-02 11:50:44 -07:00
2019-10-24 17:20:12 -07:00
2019-10-24 17:20:12 -07:00