Revisit expanded instructions for legalization.

When an illegal instruction is replaced with other instructions, back up
and revisit the expanded instructions. The new instructions need to have
encodings assigned too.

This also allows for expansions to contain illegal instructions that
need to be legalized themselves.
This commit is contained in:
Jakob Stoklund Olesen
2016-11-04 09:44:11 -07:00
parent 1c57f43643
commit a2b7769a51
3 changed files with 50 additions and 39 deletions

View File

@@ -11,8 +11,10 @@ ebb0(v1: i64, v2: i64):
; regex: VX=vx\d+
; check: $(v1l=$V), $(v1h=$VX) = isplit_lohi $v1
; check: $(v2l=$V), $(v2h=$VX) = isplit_lohi $v2
; check: $(v3l=$V) = band $v1l, $v2l
; check: $(v3h=$V) = band $v1h, $v2h
; check: [R#ec
; sameln: $(v3l=$V) = band $v1l, $v2l
; check: [R#ec
; sameln: $(v3h=$V) = band $v1h, $v2h
; check: $v3 = iconcat_lohi $v3l, $v3h
function bitwise_or(i64, i64) -> i64 {
@@ -24,8 +26,10 @@ ebb0(v1: i64, v2: i64):
; regex: VX=vx\d+
; check: $(v1l=$V), $(v1h=$VX) = isplit_lohi $v1
; check: $(v2l=$V), $(v2h=$VX) = isplit_lohi $v2
; check: $(v3l=$V) = bor $v1l, $v2l
; check: $(v3h=$V) = bor $v1h, $v2h
; check: [R#cc
; sameln: $(v3l=$V) = bor $v1l, $v2l
; check: [R#cc
; sameln: $(v3h=$V) = bor $v1h, $v2h
; check: $v3 = iconcat_lohi $v3l, $v3h
function bitwise_xor(i64, i64) -> i64 {
@@ -37,6 +41,8 @@ ebb0(v1: i64, v2: i64):
; regex: VX=vx\d+
; check: $(v1l=$V), $(v1h=$VX) = isplit_lohi $v1
; check: $(v2l=$V), $(v2h=$VX) = isplit_lohi $v2
; check: $(v3l=$V) = bxor $v1l, $v2l
; check: $(v3h=$V) = bxor $v1h, $v2h
; check: [R#8c
; sameln: $(v3l=$V) = bxor $v1l, $v2l
; check: [R#8c
; sameln: $(v3h=$V) = bxor $v1h, $v2h
; check: $v3 = iconcat_lohi $v3l, $v3h