Simplify jump table instructions and add missing conversion;

This makes non-legalized jump table instructions operate on operands with
pointer-sized types. This means we need to extend smaller types into the
pointer-sized operand, when the two don't match.
This commit is contained in:
Benjamin Bouvier
2019-08-01 17:05:38 +02:00
parent f0d7438728
commit 627ba24b59
5 changed files with 27 additions and 27 deletions

View File

@@ -14,7 +14,7 @@ ebb1: ; the loop!
fallthrough ebb2
ebb2:
v1 = iconst.i32 -14
v1 = iconst.i64 -14
v8 = ifcmp_imm v1, 2
brif uge v8, ebb1
jump ebb3
@@ -25,7 +25,7 @@ ebb3:
v7 = iadd v5, v6
indirect_jump_table_br v7, jt0
; check: ebb2:
; nextln: v8 = ifcmp_imm.i32 v1, 2
; nextln: v8 = ifcmp_imm.i64 v1, 2
; nextln: brif uge v8, ebb1
; nextln: jump ebb3
; check: ebb3: