[AArch64][GlobalISel] More widenToNextPow2 changes, this time for arithmetic/bitwise ops.

This commit is contained in:
Amara Emerson 2021-07-29 02:07:27 -07:00
parent d8fd2146da
commit da61ab8475
4 changed files with 116 additions and 695 deletions

View File

@ -114,8 +114,8 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
},
0)
.legalFor({v2s64})
.clampScalar(0, s32, s64)
.widenScalarToNextPow2(0)
.clampScalar(0, s32, s64)
.clampNumElements(0, v2s32, v4s32)
.clampNumElements(0, v2s64, v2s64)
.moreElementsToNextPow2(0);

View File

@ -52,17 +52,6 @@ end:
br label %block
}
; FALLBACK-WITH-REPORT-ERR: remark: <unknown>:0:0: cannot select: %{{[0-9]+}}:gpr(s32), %{{[0-9]+}}:gpr(s32) = G_UNMERGE_VALUES %{{[0-9]+}}:gpr(s64) (in function: nonpow2_add_narrowing)
; FALLBACK-WITH-REPORT-ERR: warning: Instruction selection used fallback path for nonpow2_add_narrowing
; FALLBACK-WITH-REPORT-OUT-LABEL: nonpow2_add_narrowing:
define void @nonpow2_add_narrowing(i128 %x, i128 %y) {
%a = add i128 %x, %y
%b = trunc i128 %a to i96
%dummy = add i96 %b, %b
store i96 %dummy, i96* undef
ret void
}
; Currently can't handle vector lengths that aren't an exact multiple of
; natively supported vector lengths. Test that the fall-back works for those.
; FALLBACK-WITH-REPORT-ERR-G_IMPLICIT_DEF-LEGALIZABLE: (FIXME: this is what is expected once we can legalize non-pow-of-2 G_IMPLICIT_DEF) remark: <unknown>:0:0: unable to legalize instruction: %1:_(<7 x s64>) = G_ADD %0, %0 (in function: nonpow2_vector_add_fewerelements

View File

@ -34,6 +34,7 @@ body: |
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x2
; CHECK: [[COPY3:%[0-9]+]]:_(s64) = COPY $x3
; CHECK: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
; CHECK: [[UADDO:%[0-9]+]]:_(s64), [[UADDO1:%[0-9]+]]:_(s1) = G_UADDO [[COPY]], [[COPY1]]
; CHECK: [[UADDE:%[0-9]+]]:_(s64), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[COPY1]], [[COPY2]], [[UADDO1]]
; CHECK: [[UADDE2:%[0-9]+]]:_(s64), [[UADDE3:%[0-9]+]]:_(s1) = G_UADDE [[COPY2]], [[COPY3]], [[UADDE1]]
@ -83,18 +84,10 @@ body: |
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x2
; CHECK: [[COPY3:%[0-9]+]]:_(s64) = COPY $x3
; CHECK: [[COPY4:%[0-9]+]]:_(s64) = COPY [[COPY]](s64)
; CHECK: [[EXTRACT:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY1]](s64), 0
; CHECK: [[COPY5:%[0-9]+]]:_(s64) = COPY [[COPY2]](s64)
; CHECK: [[EXTRACT1:%[0-9]+]]:_(s32) = G_EXTRACT [[COPY3]](s64), 0
; CHECK: [[UADDO:%[0-9]+]]:_(s64), [[UADDO1:%[0-9]+]]:_(s1) = G_UADDO [[COPY4]], [[COPY5]]
; CHECK: [[UADDE:%[0-9]+]]:_(s32), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[EXTRACT]], [[EXTRACT1]], [[UADDO1]]
; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[UADDO]](s64)
; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
; CHECK: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[UV]](s32), [[UV1]](s32)
; CHECK: [[MV1:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[UADDE]](s32), [[DEF]](s32)
; CHECK: $x0 = COPY [[MV]](s64)
; CHECK: $x1 = COPY [[MV1]](s64)
; CHECK: [[UADDO:%[0-9]+]]:_(s64), [[UADDO1:%[0-9]+]]:_(s1) = G_UADDO [[COPY]], [[COPY2]]
; CHECK: [[UADDE:%[0-9]+]]:_(s64), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[COPY1]], [[COPY3]], [[UADDO1]]
; CHECK: $x0 = COPY [[UADDO]](s64)
; CHECK: $x1 = COPY [[UADDE]](s64)
%0:_(s64) = COPY $x0
%1:_(s64) = COPY $x1
%2:_(s64) = COPY $x2
@ -119,677 +112,10 @@ body: |
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1
; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $x2
; CHECK: [[COPY3:%[0-9]+]]:_(s64) = COPY $x3
; CHECK: [[COPY4:%[0-9]+]]:_(s64) = COPY [[COPY]](s64)
; CHECK: [[EXTRACT:%[0-9]+]]:_(s1) = G_EXTRACT [[COPY1]](s64), 0
; CHECK: [[COPY5:%[0-9]+]]:_(s64) = COPY [[COPY2]](s64)
; CHECK: [[EXTRACT1:%[0-9]+]]:_(s1) = G_EXTRACT [[COPY3]](s64), 0
; CHECK: [[UADDO:%[0-9]+]]:_(s64), [[UADDO1:%[0-9]+]]:_(s1) = G_UADDO [[COPY4]], [[COPY5]]
; CHECK: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[EXTRACT]](s1)
; CHECK: [[ZEXT1:%[0-9]+]]:_(s32) = G_ZEXT [[EXTRACT1]](s1)
; CHECK: [[UADDE:%[0-9]+]]:_(s32), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[ZEXT]], [[ZEXT1]], [[UADDO1]]
; CHECK: [[UV:%[0-9]+]]:_(s8), [[UV1:%[0-9]+]]:_(s8), [[UV2:%[0-9]+]]:_(s8), [[UV3:%[0-9]+]]:_(s8), [[UV4:%[0-9]+]]:_(s8), [[UV5:%[0-9]+]]:_(s8), [[UV6:%[0-9]+]]:_(s8), [[UV7:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[UADDO]](s64)
; CHECK: [[C:%[0-9]+]]:_(s8) = G_CONSTANT i8 1
; CHECK: [[ZEXT2:%[0-9]+]]:_(s32) = G_ZEXT [[UV]](s8)
; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 1
; CHECK: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT2]], [[C1]](s64)
; CHECK: [[C2:%[0-9]+]]:_(s8) = G_CONSTANT i8 2
; CHECK: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
; CHECK: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT2]], [[C3]](s64)
; CHECK: [[C4:%[0-9]+]]:_(s8) = G_CONSTANT i8 3
; CHECK: [[C5:%[0-9]+]]:_(s64) = G_CONSTANT i64 3
; CHECK: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT2]], [[C5]](s64)
; CHECK: [[C6:%[0-9]+]]:_(s8) = G_CONSTANT i8 4
; CHECK: [[C7:%[0-9]+]]:_(s64) = G_CONSTANT i64 4
; CHECK: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT2]], [[C7]](s64)
; CHECK: [[C8:%[0-9]+]]:_(s8) = G_CONSTANT i8 5
; CHECK: [[C9:%[0-9]+]]:_(s64) = G_CONSTANT i64 5
; CHECK: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT2]], [[C9]](s64)
; CHECK: [[C10:%[0-9]+]]:_(s8) = G_CONSTANT i8 6
; CHECK: [[C11:%[0-9]+]]:_(s64) = G_CONSTANT i64 6
; CHECK: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT2]], [[C11]](s64)
; CHECK: [[C12:%[0-9]+]]:_(s8) = G_CONSTANT i8 7
; CHECK: [[C13:%[0-9]+]]:_(s64) = G_CONSTANT i64 7
; CHECK: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT2]], [[C13]](s64)
; CHECK: [[ZEXT3:%[0-9]+]]:_(s32) = G_ZEXT [[UV1]](s8)
; CHECK: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT3]], [[C1]](s64)
; CHECK: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT3]], [[C3]](s64)
; CHECK: [[LSHR9:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT3]], [[C5]](s64)
; CHECK: [[LSHR10:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT3]], [[C7]](s64)
; CHECK: [[LSHR11:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT3]], [[C9]](s64)
; CHECK: [[LSHR12:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT3]], [[C11]](s64)
; CHECK: [[LSHR13:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT3]], [[C13]](s64)
; CHECK: [[ZEXT4:%[0-9]+]]:_(s32) = G_ZEXT [[UV2]](s8)
; CHECK: [[LSHR14:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT4]], [[C1]](s64)
; CHECK: [[LSHR15:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT4]], [[C3]](s64)
; CHECK: [[LSHR16:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT4]], [[C5]](s64)
; CHECK: [[LSHR17:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT4]], [[C7]](s64)
; CHECK: [[LSHR18:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT4]], [[C9]](s64)
; CHECK: [[LSHR19:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT4]], [[C11]](s64)
; CHECK: [[LSHR20:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT4]], [[C13]](s64)
; CHECK: [[ZEXT5:%[0-9]+]]:_(s32) = G_ZEXT [[UV3]](s8)
; CHECK: [[LSHR21:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT5]], [[C1]](s64)
; CHECK: [[LSHR22:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT5]], [[C3]](s64)
; CHECK: [[LSHR23:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT5]], [[C5]](s64)
; CHECK: [[LSHR24:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT5]], [[C7]](s64)
; CHECK: [[LSHR25:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT5]], [[C9]](s64)
; CHECK: [[LSHR26:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT5]], [[C11]](s64)
; CHECK: [[LSHR27:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT5]], [[C13]](s64)
; CHECK: [[ZEXT6:%[0-9]+]]:_(s32) = G_ZEXT [[UV4]](s8)
; CHECK: [[LSHR28:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT6]], [[C1]](s64)
; CHECK: [[LSHR29:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT6]], [[C3]](s64)
; CHECK: [[LSHR30:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT6]], [[C5]](s64)
; CHECK: [[LSHR31:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT6]], [[C7]](s64)
; CHECK: [[LSHR32:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT6]], [[C9]](s64)
; CHECK: [[LSHR33:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT6]], [[C11]](s64)
; CHECK: [[LSHR34:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT6]], [[C13]](s64)
; CHECK: [[ZEXT7:%[0-9]+]]:_(s32) = G_ZEXT [[UV5]](s8)
; CHECK: [[LSHR35:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT7]], [[C1]](s64)
; CHECK: [[LSHR36:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT7]], [[C3]](s64)
; CHECK: [[LSHR37:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT7]], [[C5]](s64)
; CHECK: [[LSHR38:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT7]], [[C7]](s64)
; CHECK: [[LSHR39:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT7]], [[C9]](s64)
; CHECK: [[LSHR40:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT7]], [[C11]](s64)
; CHECK: [[LSHR41:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT7]], [[C13]](s64)
; CHECK: [[ZEXT8:%[0-9]+]]:_(s32) = G_ZEXT [[UV6]](s8)
; CHECK: [[LSHR42:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT8]], [[C1]](s64)
; CHECK: [[LSHR43:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT8]], [[C3]](s64)
; CHECK: [[LSHR44:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT8]], [[C5]](s64)
; CHECK: [[LSHR45:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT8]], [[C7]](s64)
; CHECK: [[LSHR46:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT8]], [[C9]](s64)
; CHECK: [[LSHR47:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT8]], [[C11]](s64)
; CHECK: [[LSHR48:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT8]], [[C13]](s64)
; CHECK: [[ZEXT9:%[0-9]+]]:_(s32) = G_ZEXT [[UV7]](s8)
; CHECK: [[LSHR49:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT9]], [[C1]](s64)
; CHECK: [[LSHR50:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT9]], [[C3]](s64)
; CHECK: [[LSHR51:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT9]], [[C5]](s64)
; CHECK: [[LSHR52:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT9]], [[C7]](s64)
; CHECK: [[LSHR53:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT9]], [[C9]](s64)
; CHECK: [[LSHR54:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT9]], [[C11]](s64)
; CHECK: [[LSHR55:%[0-9]+]]:_(s32) = G_LSHR [[ZEXT9]], [[C13]](s64)
; CHECK: [[C14:%[0-9]+]]:_(s32) = G_CONSTANT i32 1
; CHECK: [[COPY6:%[0-9]+]]:_(s32) = COPY [[LSHR]](s32)
; CHECK: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY6]], [[C14]]
; CHECK: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND]], [[C1]](s64)
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[UV]](s8)
; CHECK: [[AND1:%[0-9]+]]:_(s32) = G_AND [[ANYEXT]], [[C14]]
; CHECK: [[COPY7:%[0-9]+]]:_(s32) = COPY [[SHL]](s32)
; CHECK: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND1]], [[COPY7]]
; CHECK: [[COPY8:%[0-9]+]]:_(s32) = COPY [[LSHR1]](s32)
; CHECK: [[AND2:%[0-9]+]]:_(s32) = G_AND [[COPY8]], [[C14]]
; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[AND2]], [[C3]](s64)
; CHECK: [[COPY9:%[0-9]+]]:_(s32) = COPY [[OR]](s32)
; CHECK: [[COPY10:%[0-9]+]]:_(s32) = COPY [[SHL1]](s32)
; CHECK: [[OR1:%[0-9]+]]:_(s32) = G_OR [[COPY9]], [[COPY10]]
; CHECK: [[COPY11:%[0-9]+]]:_(s32) = COPY [[LSHR2]](s32)
; CHECK: [[AND3:%[0-9]+]]:_(s32) = G_AND [[COPY11]], [[C14]]
; CHECK: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C5]](s64)
; CHECK: [[COPY12:%[0-9]+]]:_(s32) = COPY [[OR1]](s32)
; CHECK: [[COPY13:%[0-9]+]]:_(s32) = COPY [[SHL2]](s32)
; CHECK: [[OR2:%[0-9]+]]:_(s32) = G_OR [[COPY12]], [[COPY13]]
; CHECK: [[COPY14:%[0-9]+]]:_(s32) = COPY [[LSHR3]](s32)
; CHECK: [[AND4:%[0-9]+]]:_(s32) = G_AND [[COPY14]], [[C14]]
; CHECK: [[SHL3:%[0-9]+]]:_(s32) = G_SHL [[AND4]], [[C7]](s64)
; CHECK: [[COPY15:%[0-9]+]]:_(s32) = COPY [[OR2]](s32)
; CHECK: [[COPY16:%[0-9]+]]:_(s32) = COPY [[SHL3]](s32)
; CHECK: [[OR3:%[0-9]+]]:_(s32) = G_OR [[COPY15]], [[COPY16]]
; CHECK: [[COPY17:%[0-9]+]]:_(s32) = COPY [[LSHR4]](s32)
; CHECK: [[AND5:%[0-9]+]]:_(s32) = G_AND [[COPY17]], [[C14]]
; CHECK: [[SHL4:%[0-9]+]]:_(s32) = G_SHL [[AND5]], [[C9]](s64)
; CHECK: [[COPY18:%[0-9]+]]:_(s32) = COPY [[OR3]](s32)
; CHECK: [[COPY19:%[0-9]+]]:_(s32) = COPY [[SHL4]](s32)
; CHECK: [[OR4:%[0-9]+]]:_(s32) = G_OR [[COPY18]], [[COPY19]]
; CHECK: [[COPY20:%[0-9]+]]:_(s32) = COPY [[LSHR5]](s32)
; CHECK: [[AND6:%[0-9]+]]:_(s32) = G_AND [[COPY20]], [[C14]]
; CHECK: [[SHL5:%[0-9]+]]:_(s32) = G_SHL [[AND6]], [[C11]](s64)
; CHECK: [[COPY21:%[0-9]+]]:_(s32) = COPY [[OR4]](s32)
; CHECK: [[COPY22:%[0-9]+]]:_(s32) = COPY [[SHL5]](s32)
; CHECK: [[OR5:%[0-9]+]]:_(s32) = G_OR [[COPY21]], [[COPY22]]
; CHECK: [[COPY23:%[0-9]+]]:_(s32) = COPY [[LSHR6]](s32)
; CHECK: [[AND7:%[0-9]+]]:_(s32) = G_AND [[COPY23]], [[C14]]
; CHECK: [[SHL6:%[0-9]+]]:_(s32) = G_SHL [[AND7]], [[C13]](s64)
; CHECK: [[COPY24:%[0-9]+]]:_(s32) = COPY [[OR5]](s32)
; CHECK: [[COPY25:%[0-9]+]]:_(s32) = COPY [[SHL6]](s32)
; CHECK: [[OR6:%[0-9]+]]:_(s32) = G_OR [[COPY24]], [[COPY25]]
; CHECK: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[OR6]](s32)
; CHECK: [[COPY26:%[0-9]+]]:_(s32) = COPY [[LSHR7]](s32)
; CHECK: [[AND8:%[0-9]+]]:_(s32) = G_AND [[COPY26]], [[C14]]
; CHECK: [[SHL7:%[0-9]+]]:_(s32) = G_SHL [[AND8]], [[C1]](s64)
; CHECK: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[UV1]](s8)
; CHECK: [[AND9:%[0-9]+]]:_(s32) = G_AND [[ANYEXT1]], [[C14]]
; CHECK: [[COPY27:%[0-9]+]]:_(s32) = COPY [[SHL7]](s32)
; CHECK: [[OR7:%[0-9]+]]:_(s32) = G_OR [[AND9]], [[COPY27]]
; CHECK: [[COPY28:%[0-9]+]]:_(s32) = COPY [[LSHR8]](s32)
; CHECK: [[AND10:%[0-9]+]]:_(s32) = G_AND [[COPY28]], [[C14]]
; CHECK: [[SHL8:%[0-9]+]]:_(s32) = G_SHL [[AND10]], [[C3]](s64)
; CHECK: [[COPY29:%[0-9]+]]:_(s32) = COPY [[OR7]](s32)
; CHECK: [[COPY30:%[0-9]+]]:_(s32) = COPY [[SHL8]](s32)
; CHECK: [[OR8:%[0-9]+]]:_(s32) = G_OR [[COPY29]], [[COPY30]]
; CHECK: [[COPY31:%[0-9]+]]:_(s32) = COPY [[LSHR9]](s32)
; CHECK: [[AND11:%[0-9]+]]:_(s32) = G_AND [[COPY31]], [[C14]]
; CHECK: [[SHL9:%[0-9]+]]:_(s32) = G_SHL [[AND11]], [[C5]](s64)
; CHECK: [[COPY32:%[0-9]+]]:_(s32) = COPY [[OR8]](s32)
; CHECK: [[COPY33:%[0-9]+]]:_(s32) = COPY [[SHL9]](s32)
; CHECK: [[OR9:%[0-9]+]]:_(s32) = G_OR [[COPY32]], [[COPY33]]
; CHECK: [[COPY34:%[0-9]+]]:_(s32) = COPY [[LSHR10]](s32)
; CHECK: [[AND12:%[0-9]+]]:_(s32) = G_AND [[COPY34]], [[C14]]
; CHECK: [[SHL10:%[0-9]+]]:_(s32) = G_SHL [[AND12]], [[C7]](s64)
; CHECK: [[COPY35:%[0-9]+]]:_(s32) = COPY [[OR9]](s32)
; CHECK: [[COPY36:%[0-9]+]]:_(s32) = COPY [[SHL10]](s32)
; CHECK: [[OR10:%[0-9]+]]:_(s32) = G_OR [[COPY35]], [[COPY36]]
; CHECK: [[COPY37:%[0-9]+]]:_(s32) = COPY [[LSHR11]](s32)
; CHECK: [[AND13:%[0-9]+]]:_(s32) = G_AND [[COPY37]], [[C14]]
; CHECK: [[SHL11:%[0-9]+]]:_(s32) = G_SHL [[AND13]], [[C9]](s64)
; CHECK: [[COPY38:%[0-9]+]]:_(s32) = COPY [[OR10]](s32)
; CHECK: [[COPY39:%[0-9]+]]:_(s32) = COPY [[SHL11]](s32)
; CHECK: [[OR11:%[0-9]+]]:_(s32) = G_OR [[COPY38]], [[COPY39]]
; CHECK: [[COPY40:%[0-9]+]]:_(s32) = COPY [[LSHR12]](s32)
; CHECK: [[AND14:%[0-9]+]]:_(s32) = G_AND [[COPY40]], [[C14]]
; CHECK: [[SHL12:%[0-9]+]]:_(s32) = G_SHL [[AND14]], [[C11]](s64)
; CHECK: [[COPY41:%[0-9]+]]:_(s32) = COPY [[OR11]](s32)
; CHECK: [[COPY42:%[0-9]+]]:_(s32) = COPY [[SHL12]](s32)
; CHECK: [[OR12:%[0-9]+]]:_(s32) = G_OR [[COPY41]], [[COPY42]]
; CHECK: [[COPY43:%[0-9]+]]:_(s32) = COPY [[LSHR13]](s32)
; CHECK: [[AND15:%[0-9]+]]:_(s32) = G_AND [[COPY43]], [[C14]]
; CHECK: [[SHL13:%[0-9]+]]:_(s32) = G_SHL [[AND15]], [[C13]](s64)
; CHECK: [[COPY44:%[0-9]+]]:_(s32) = COPY [[OR12]](s32)
; CHECK: [[COPY45:%[0-9]+]]:_(s32) = COPY [[SHL13]](s32)
; CHECK: [[OR13:%[0-9]+]]:_(s32) = G_OR [[COPY44]], [[COPY45]]
; CHECK: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[OR13]](s32)
; CHECK: [[COPY46:%[0-9]+]]:_(s32) = COPY [[LSHR14]](s32)
; CHECK: [[AND16:%[0-9]+]]:_(s32) = G_AND [[COPY46]], [[C14]]
; CHECK: [[SHL14:%[0-9]+]]:_(s32) = G_SHL [[AND16]], [[C1]](s64)
; CHECK: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[UV2]](s8)
; CHECK: [[AND17:%[0-9]+]]:_(s32) = G_AND [[ANYEXT2]], [[C14]]
; CHECK: [[COPY47:%[0-9]+]]:_(s32) = COPY [[SHL14]](s32)
; CHECK: [[OR14:%[0-9]+]]:_(s32) = G_OR [[AND17]], [[COPY47]]
; CHECK: [[COPY48:%[0-9]+]]:_(s32) = COPY [[LSHR15]](s32)
; CHECK: [[AND18:%[0-9]+]]:_(s32) = G_AND [[COPY48]], [[C14]]
; CHECK: [[SHL15:%[0-9]+]]:_(s32) = G_SHL [[AND18]], [[C3]](s64)
; CHECK: [[COPY49:%[0-9]+]]:_(s32) = COPY [[OR14]](s32)
; CHECK: [[COPY50:%[0-9]+]]:_(s32) = COPY [[SHL15]](s32)
; CHECK: [[OR15:%[0-9]+]]:_(s32) = G_OR [[COPY49]], [[COPY50]]
; CHECK: [[COPY51:%[0-9]+]]:_(s32) = COPY [[LSHR16]](s32)
; CHECK: [[AND19:%[0-9]+]]:_(s32) = G_AND [[COPY51]], [[C14]]
; CHECK: [[SHL16:%[0-9]+]]:_(s32) = G_SHL [[AND19]], [[C5]](s64)
; CHECK: [[COPY52:%[0-9]+]]:_(s32) = COPY [[OR15]](s32)
; CHECK: [[COPY53:%[0-9]+]]:_(s32) = COPY [[SHL16]](s32)
; CHECK: [[OR16:%[0-9]+]]:_(s32) = G_OR [[COPY52]], [[COPY53]]
; CHECK: [[COPY54:%[0-9]+]]:_(s32) = COPY [[LSHR17]](s32)
; CHECK: [[AND20:%[0-9]+]]:_(s32) = G_AND [[COPY54]], [[C14]]
; CHECK: [[SHL17:%[0-9]+]]:_(s32) = G_SHL [[AND20]], [[C7]](s64)
; CHECK: [[COPY55:%[0-9]+]]:_(s32) = COPY [[OR16]](s32)
; CHECK: [[COPY56:%[0-9]+]]:_(s32) = COPY [[SHL17]](s32)
; CHECK: [[OR17:%[0-9]+]]:_(s32) = G_OR [[COPY55]], [[COPY56]]
; CHECK: [[COPY57:%[0-9]+]]:_(s32) = COPY [[LSHR18]](s32)
; CHECK: [[AND21:%[0-9]+]]:_(s32) = G_AND [[COPY57]], [[C14]]
; CHECK: [[SHL18:%[0-9]+]]:_(s32) = G_SHL [[AND21]], [[C9]](s64)
; CHECK: [[COPY58:%[0-9]+]]:_(s32) = COPY [[OR17]](s32)
; CHECK: [[COPY59:%[0-9]+]]:_(s32) = COPY [[SHL18]](s32)
; CHECK: [[OR18:%[0-9]+]]:_(s32) = G_OR [[COPY58]], [[COPY59]]
; CHECK: [[COPY60:%[0-9]+]]:_(s32) = COPY [[LSHR19]](s32)
; CHECK: [[AND22:%[0-9]+]]:_(s32) = G_AND [[COPY60]], [[C14]]
; CHECK: [[SHL19:%[0-9]+]]:_(s32) = G_SHL [[AND22]], [[C11]](s64)
; CHECK: [[COPY61:%[0-9]+]]:_(s32) = COPY [[OR18]](s32)
; CHECK: [[COPY62:%[0-9]+]]:_(s32) = COPY [[SHL19]](s32)
; CHECK: [[OR19:%[0-9]+]]:_(s32) = G_OR [[COPY61]], [[COPY62]]
; CHECK: [[COPY63:%[0-9]+]]:_(s32) = COPY [[LSHR20]](s32)
; CHECK: [[AND23:%[0-9]+]]:_(s32) = G_AND [[COPY63]], [[C14]]
; CHECK: [[SHL20:%[0-9]+]]:_(s32) = G_SHL [[AND23]], [[C13]](s64)
; CHECK: [[COPY64:%[0-9]+]]:_(s32) = COPY [[OR19]](s32)
; CHECK: [[COPY65:%[0-9]+]]:_(s32) = COPY [[SHL20]](s32)
; CHECK: [[OR20:%[0-9]+]]:_(s32) = G_OR [[COPY64]], [[COPY65]]
; CHECK: [[TRUNC2:%[0-9]+]]:_(s8) = G_TRUNC [[OR20]](s32)
; CHECK: [[COPY66:%[0-9]+]]:_(s32) = COPY [[LSHR21]](s32)
; CHECK: [[AND24:%[0-9]+]]:_(s32) = G_AND [[COPY66]], [[C14]]
; CHECK: [[SHL21:%[0-9]+]]:_(s32) = G_SHL [[AND24]], [[C1]](s64)
; CHECK: [[ANYEXT3:%[0-9]+]]:_(s32) = G_ANYEXT [[UV3]](s8)
; CHECK: [[AND25:%[0-9]+]]:_(s32) = G_AND [[ANYEXT3]], [[C14]]
; CHECK: [[COPY67:%[0-9]+]]:_(s32) = COPY [[SHL21]](s32)
; CHECK: [[OR21:%[0-9]+]]:_(s32) = G_OR [[AND25]], [[COPY67]]
; CHECK: [[COPY68:%[0-9]+]]:_(s32) = COPY [[LSHR22]](s32)
; CHECK: [[AND26:%[0-9]+]]:_(s32) = G_AND [[COPY68]], [[C14]]
; CHECK: [[SHL22:%[0-9]+]]:_(s32) = G_SHL [[AND26]], [[C3]](s64)
; CHECK: [[COPY69:%[0-9]+]]:_(s32) = COPY [[OR21]](s32)
; CHECK: [[COPY70:%[0-9]+]]:_(s32) = COPY [[SHL22]](s32)
; CHECK: [[OR22:%[0-9]+]]:_(s32) = G_OR [[COPY69]], [[COPY70]]
; CHECK: [[COPY71:%[0-9]+]]:_(s32) = COPY [[LSHR23]](s32)
; CHECK: [[AND27:%[0-9]+]]:_(s32) = G_AND [[COPY71]], [[C14]]
; CHECK: [[SHL23:%[0-9]+]]:_(s32) = G_SHL [[AND27]], [[C5]](s64)
; CHECK: [[COPY72:%[0-9]+]]:_(s32) = COPY [[OR22]](s32)
; CHECK: [[COPY73:%[0-9]+]]:_(s32) = COPY [[SHL23]](s32)
; CHECK: [[OR23:%[0-9]+]]:_(s32) = G_OR [[COPY72]], [[COPY73]]
; CHECK: [[COPY74:%[0-9]+]]:_(s32) = COPY [[LSHR24]](s32)
; CHECK: [[AND28:%[0-9]+]]:_(s32) = G_AND [[COPY74]], [[C14]]
; CHECK: [[SHL24:%[0-9]+]]:_(s32) = G_SHL [[AND28]], [[C7]](s64)
; CHECK: [[COPY75:%[0-9]+]]:_(s32) = COPY [[OR23]](s32)
; CHECK: [[COPY76:%[0-9]+]]:_(s32) = COPY [[SHL24]](s32)
; CHECK: [[OR24:%[0-9]+]]:_(s32) = G_OR [[COPY75]], [[COPY76]]
; CHECK: [[COPY77:%[0-9]+]]:_(s32) = COPY [[LSHR25]](s32)
; CHECK: [[AND29:%[0-9]+]]:_(s32) = G_AND [[COPY77]], [[C14]]
; CHECK: [[SHL25:%[0-9]+]]:_(s32) = G_SHL [[AND29]], [[C9]](s64)
; CHECK: [[COPY78:%[0-9]+]]:_(s32) = COPY [[OR24]](s32)
; CHECK: [[COPY79:%[0-9]+]]:_(s32) = COPY [[SHL25]](s32)
; CHECK: [[OR25:%[0-9]+]]:_(s32) = G_OR [[COPY78]], [[COPY79]]
; CHECK: [[COPY80:%[0-9]+]]:_(s32) = COPY [[LSHR26]](s32)
; CHECK: [[AND30:%[0-9]+]]:_(s32) = G_AND [[COPY80]], [[C14]]
; CHECK: [[SHL26:%[0-9]+]]:_(s32) = G_SHL [[AND30]], [[C11]](s64)
; CHECK: [[COPY81:%[0-9]+]]:_(s32) = COPY [[OR25]](s32)
; CHECK: [[COPY82:%[0-9]+]]:_(s32) = COPY [[SHL26]](s32)
; CHECK: [[OR26:%[0-9]+]]:_(s32) = G_OR [[COPY81]], [[COPY82]]
; CHECK: [[COPY83:%[0-9]+]]:_(s32) = COPY [[LSHR27]](s32)
; CHECK: [[AND31:%[0-9]+]]:_(s32) = G_AND [[COPY83]], [[C14]]
; CHECK: [[SHL27:%[0-9]+]]:_(s32) = G_SHL [[AND31]], [[C13]](s64)
; CHECK: [[COPY84:%[0-9]+]]:_(s32) = COPY [[OR26]](s32)
; CHECK: [[COPY85:%[0-9]+]]:_(s32) = COPY [[SHL27]](s32)
; CHECK: [[OR27:%[0-9]+]]:_(s32) = G_OR [[COPY84]], [[COPY85]]
; CHECK: [[TRUNC3:%[0-9]+]]:_(s8) = G_TRUNC [[OR27]](s32)
; CHECK: [[COPY86:%[0-9]+]]:_(s32) = COPY [[LSHR28]](s32)
; CHECK: [[AND32:%[0-9]+]]:_(s32) = G_AND [[COPY86]], [[C14]]
; CHECK: [[SHL28:%[0-9]+]]:_(s32) = G_SHL [[AND32]], [[C1]](s64)
; CHECK: [[ANYEXT4:%[0-9]+]]:_(s32) = G_ANYEXT [[UV4]](s8)
; CHECK: [[AND33:%[0-9]+]]:_(s32) = G_AND [[ANYEXT4]], [[C14]]
; CHECK: [[COPY87:%[0-9]+]]:_(s32) = COPY [[SHL28]](s32)
; CHECK: [[OR28:%[0-9]+]]:_(s32) = G_OR [[AND33]], [[COPY87]]
; CHECK: [[COPY88:%[0-9]+]]:_(s32) = COPY [[LSHR29]](s32)
; CHECK: [[AND34:%[0-9]+]]:_(s32) = G_AND [[COPY88]], [[C14]]
; CHECK: [[SHL29:%[0-9]+]]:_(s32) = G_SHL [[AND34]], [[C3]](s64)
; CHECK: [[COPY89:%[0-9]+]]:_(s32) = COPY [[OR28]](s32)
; CHECK: [[COPY90:%[0-9]+]]:_(s32) = COPY [[SHL29]](s32)
; CHECK: [[OR29:%[0-9]+]]:_(s32) = G_OR [[COPY89]], [[COPY90]]
; CHECK: [[COPY91:%[0-9]+]]:_(s32) = COPY [[LSHR30]](s32)
; CHECK: [[AND35:%[0-9]+]]:_(s32) = G_AND [[COPY91]], [[C14]]
; CHECK: [[SHL30:%[0-9]+]]:_(s32) = G_SHL [[AND35]], [[C5]](s64)
; CHECK: [[COPY92:%[0-9]+]]:_(s32) = COPY [[OR29]](s32)
; CHECK: [[COPY93:%[0-9]+]]:_(s32) = COPY [[SHL30]](s32)
; CHECK: [[OR30:%[0-9]+]]:_(s32) = G_OR [[COPY92]], [[COPY93]]
; CHECK: [[COPY94:%[0-9]+]]:_(s32) = COPY [[LSHR31]](s32)
; CHECK: [[AND36:%[0-9]+]]:_(s32) = G_AND [[COPY94]], [[C14]]
; CHECK: [[SHL31:%[0-9]+]]:_(s32) = G_SHL [[AND36]], [[C7]](s64)
; CHECK: [[COPY95:%[0-9]+]]:_(s32) = COPY [[OR30]](s32)
; CHECK: [[COPY96:%[0-9]+]]:_(s32) = COPY [[SHL31]](s32)
; CHECK: [[OR31:%[0-9]+]]:_(s32) = G_OR [[COPY95]], [[COPY96]]
; CHECK: [[COPY97:%[0-9]+]]:_(s32) = COPY [[LSHR32]](s32)
; CHECK: [[AND37:%[0-9]+]]:_(s32) = G_AND [[COPY97]], [[C14]]
; CHECK: [[SHL32:%[0-9]+]]:_(s32) = G_SHL [[AND37]], [[C9]](s64)
; CHECK: [[COPY98:%[0-9]+]]:_(s32) = COPY [[OR31]](s32)
; CHECK: [[COPY99:%[0-9]+]]:_(s32) = COPY [[SHL32]](s32)
; CHECK: [[OR32:%[0-9]+]]:_(s32) = G_OR [[COPY98]], [[COPY99]]
; CHECK: [[COPY100:%[0-9]+]]:_(s32) = COPY [[LSHR33]](s32)
; CHECK: [[AND38:%[0-9]+]]:_(s32) = G_AND [[COPY100]], [[C14]]
; CHECK: [[SHL33:%[0-9]+]]:_(s32) = G_SHL [[AND38]], [[C11]](s64)
; CHECK: [[COPY101:%[0-9]+]]:_(s32) = COPY [[OR32]](s32)
; CHECK: [[COPY102:%[0-9]+]]:_(s32) = COPY [[SHL33]](s32)
; CHECK: [[OR33:%[0-9]+]]:_(s32) = G_OR [[COPY101]], [[COPY102]]
; CHECK: [[COPY103:%[0-9]+]]:_(s32) = COPY [[LSHR34]](s32)
; CHECK: [[AND39:%[0-9]+]]:_(s32) = G_AND [[COPY103]], [[C14]]
; CHECK: [[SHL34:%[0-9]+]]:_(s32) = G_SHL [[AND39]], [[C13]](s64)
; CHECK: [[COPY104:%[0-9]+]]:_(s32) = COPY [[OR33]](s32)
; CHECK: [[COPY105:%[0-9]+]]:_(s32) = COPY [[SHL34]](s32)
; CHECK: [[OR34:%[0-9]+]]:_(s32) = G_OR [[COPY104]], [[COPY105]]
; CHECK: [[TRUNC4:%[0-9]+]]:_(s8) = G_TRUNC [[OR34]](s32)
; CHECK: [[COPY106:%[0-9]+]]:_(s32) = COPY [[LSHR35]](s32)
; CHECK: [[AND40:%[0-9]+]]:_(s32) = G_AND [[COPY106]], [[C14]]
; CHECK: [[SHL35:%[0-9]+]]:_(s32) = G_SHL [[AND40]], [[C1]](s64)
; CHECK: [[ANYEXT5:%[0-9]+]]:_(s32) = G_ANYEXT [[UV5]](s8)
; CHECK: [[AND41:%[0-9]+]]:_(s32) = G_AND [[ANYEXT5]], [[C14]]
; CHECK: [[COPY107:%[0-9]+]]:_(s32) = COPY [[SHL35]](s32)
; CHECK: [[OR35:%[0-9]+]]:_(s32) = G_OR [[AND41]], [[COPY107]]
; CHECK: [[COPY108:%[0-9]+]]:_(s32) = COPY [[LSHR36]](s32)
; CHECK: [[AND42:%[0-9]+]]:_(s32) = G_AND [[COPY108]], [[C14]]
; CHECK: [[SHL36:%[0-9]+]]:_(s32) = G_SHL [[AND42]], [[C3]](s64)
; CHECK: [[COPY109:%[0-9]+]]:_(s32) = COPY [[OR35]](s32)
; CHECK: [[COPY110:%[0-9]+]]:_(s32) = COPY [[SHL36]](s32)
; CHECK: [[OR36:%[0-9]+]]:_(s32) = G_OR [[COPY109]], [[COPY110]]
; CHECK: [[COPY111:%[0-9]+]]:_(s32) = COPY [[LSHR37]](s32)
; CHECK: [[AND43:%[0-9]+]]:_(s32) = G_AND [[COPY111]], [[C14]]
; CHECK: [[SHL37:%[0-9]+]]:_(s32) = G_SHL [[AND43]], [[C5]](s64)
; CHECK: [[COPY112:%[0-9]+]]:_(s32) = COPY [[OR36]](s32)
; CHECK: [[COPY113:%[0-9]+]]:_(s32) = COPY [[SHL37]](s32)
; CHECK: [[OR37:%[0-9]+]]:_(s32) = G_OR [[COPY112]], [[COPY113]]
; CHECK: [[COPY114:%[0-9]+]]:_(s32) = COPY [[LSHR38]](s32)
; CHECK: [[AND44:%[0-9]+]]:_(s32) = G_AND [[COPY114]], [[C14]]
; CHECK: [[SHL38:%[0-9]+]]:_(s32) = G_SHL [[AND44]], [[C7]](s64)
; CHECK: [[COPY115:%[0-9]+]]:_(s32) = COPY [[OR37]](s32)
; CHECK: [[COPY116:%[0-9]+]]:_(s32) = COPY [[SHL38]](s32)
; CHECK: [[OR38:%[0-9]+]]:_(s32) = G_OR [[COPY115]], [[COPY116]]
; CHECK: [[COPY117:%[0-9]+]]:_(s32) = COPY [[LSHR39]](s32)
; CHECK: [[AND45:%[0-9]+]]:_(s32) = G_AND [[COPY117]], [[C14]]
; CHECK: [[SHL39:%[0-9]+]]:_(s32) = G_SHL [[AND45]], [[C9]](s64)
; CHECK: [[COPY118:%[0-9]+]]:_(s32) = COPY [[OR38]](s32)
; CHECK: [[COPY119:%[0-9]+]]:_(s32) = COPY [[SHL39]](s32)
; CHECK: [[OR39:%[0-9]+]]:_(s32) = G_OR [[COPY118]], [[COPY119]]
; CHECK: [[COPY120:%[0-9]+]]:_(s32) = COPY [[LSHR40]](s32)
; CHECK: [[AND46:%[0-9]+]]:_(s32) = G_AND [[COPY120]], [[C14]]
; CHECK: [[SHL40:%[0-9]+]]:_(s32) = G_SHL [[AND46]], [[C11]](s64)
; CHECK: [[COPY121:%[0-9]+]]:_(s32) = COPY [[OR39]](s32)
; CHECK: [[COPY122:%[0-9]+]]:_(s32) = COPY [[SHL40]](s32)
; CHECK: [[OR40:%[0-9]+]]:_(s32) = G_OR [[COPY121]], [[COPY122]]
; CHECK: [[COPY123:%[0-9]+]]:_(s32) = COPY [[LSHR41]](s32)
; CHECK: [[AND47:%[0-9]+]]:_(s32) = G_AND [[COPY123]], [[C14]]
; CHECK: [[SHL41:%[0-9]+]]:_(s32) = G_SHL [[AND47]], [[C13]](s64)
; CHECK: [[COPY124:%[0-9]+]]:_(s32) = COPY [[OR40]](s32)
; CHECK: [[COPY125:%[0-9]+]]:_(s32) = COPY [[SHL41]](s32)
; CHECK: [[OR41:%[0-9]+]]:_(s32) = G_OR [[COPY124]], [[COPY125]]
; CHECK: [[TRUNC5:%[0-9]+]]:_(s8) = G_TRUNC [[OR41]](s32)
; CHECK: [[COPY126:%[0-9]+]]:_(s32) = COPY [[LSHR42]](s32)
; CHECK: [[AND48:%[0-9]+]]:_(s32) = G_AND [[COPY126]], [[C14]]
; CHECK: [[SHL42:%[0-9]+]]:_(s32) = G_SHL [[AND48]], [[C1]](s64)
; CHECK: [[ANYEXT6:%[0-9]+]]:_(s32) = G_ANYEXT [[UV6]](s8)
; CHECK: [[AND49:%[0-9]+]]:_(s32) = G_AND [[ANYEXT6]], [[C14]]
; CHECK: [[COPY127:%[0-9]+]]:_(s32) = COPY [[SHL42]](s32)
; CHECK: [[OR42:%[0-9]+]]:_(s32) = G_OR [[AND49]], [[COPY127]]
; CHECK: [[COPY128:%[0-9]+]]:_(s32) = COPY [[LSHR43]](s32)
; CHECK: [[AND50:%[0-9]+]]:_(s32) = G_AND [[COPY128]], [[C14]]
; CHECK: [[SHL43:%[0-9]+]]:_(s32) = G_SHL [[AND50]], [[C3]](s64)
; CHECK: [[COPY129:%[0-9]+]]:_(s32) = COPY [[OR42]](s32)
; CHECK: [[COPY130:%[0-9]+]]:_(s32) = COPY [[SHL43]](s32)
; CHECK: [[OR43:%[0-9]+]]:_(s32) = G_OR [[COPY129]], [[COPY130]]
; CHECK: [[COPY131:%[0-9]+]]:_(s32) = COPY [[LSHR44]](s32)
; CHECK: [[AND51:%[0-9]+]]:_(s32) = G_AND [[COPY131]], [[C14]]
; CHECK: [[SHL44:%[0-9]+]]:_(s32) = G_SHL [[AND51]], [[C5]](s64)
; CHECK: [[COPY132:%[0-9]+]]:_(s32) = COPY [[OR43]](s32)
; CHECK: [[COPY133:%[0-9]+]]:_(s32) = COPY [[SHL44]](s32)
; CHECK: [[OR44:%[0-9]+]]:_(s32) = G_OR [[COPY132]], [[COPY133]]
; CHECK: [[COPY134:%[0-9]+]]:_(s32) = COPY [[LSHR45]](s32)
; CHECK: [[AND52:%[0-9]+]]:_(s32) = G_AND [[COPY134]], [[C14]]
; CHECK: [[SHL45:%[0-9]+]]:_(s32) = G_SHL [[AND52]], [[C7]](s64)
; CHECK: [[COPY135:%[0-9]+]]:_(s32) = COPY [[OR44]](s32)
; CHECK: [[COPY136:%[0-9]+]]:_(s32) = COPY [[SHL45]](s32)
; CHECK: [[OR45:%[0-9]+]]:_(s32) = G_OR [[COPY135]], [[COPY136]]
; CHECK: [[COPY137:%[0-9]+]]:_(s32) = COPY [[LSHR46]](s32)
; CHECK: [[AND53:%[0-9]+]]:_(s32) = G_AND [[COPY137]], [[C14]]
; CHECK: [[SHL46:%[0-9]+]]:_(s32) = G_SHL [[AND53]], [[C9]](s64)
; CHECK: [[COPY138:%[0-9]+]]:_(s32) = COPY [[OR45]](s32)
; CHECK: [[COPY139:%[0-9]+]]:_(s32) = COPY [[SHL46]](s32)
; CHECK: [[OR46:%[0-9]+]]:_(s32) = G_OR [[COPY138]], [[COPY139]]
; CHECK: [[COPY140:%[0-9]+]]:_(s32) = COPY [[LSHR47]](s32)
; CHECK: [[AND54:%[0-9]+]]:_(s32) = G_AND [[COPY140]], [[C14]]
; CHECK: [[SHL47:%[0-9]+]]:_(s32) = G_SHL [[AND54]], [[C11]](s64)
; CHECK: [[COPY141:%[0-9]+]]:_(s32) = COPY [[OR46]](s32)
; CHECK: [[COPY142:%[0-9]+]]:_(s32) = COPY [[SHL47]](s32)
; CHECK: [[OR47:%[0-9]+]]:_(s32) = G_OR [[COPY141]], [[COPY142]]
; CHECK: [[COPY143:%[0-9]+]]:_(s32) = COPY [[LSHR48]](s32)
; CHECK: [[AND55:%[0-9]+]]:_(s32) = G_AND [[COPY143]], [[C14]]
; CHECK: [[SHL48:%[0-9]+]]:_(s32) = G_SHL [[AND55]], [[C13]](s64)
; CHECK: [[COPY144:%[0-9]+]]:_(s32) = COPY [[OR47]](s32)
; CHECK: [[COPY145:%[0-9]+]]:_(s32) = COPY [[SHL48]](s32)
; CHECK: [[OR48:%[0-9]+]]:_(s32) = G_OR [[COPY144]], [[COPY145]]
; CHECK: [[TRUNC6:%[0-9]+]]:_(s8) = G_TRUNC [[OR48]](s32)
; CHECK: [[COPY146:%[0-9]+]]:_(s32) = COPY [[LSHR49]](s32)
; CHECK: [[AND56:%[0-9]+]]:_(s32) = G_AND [[COPY146]], [[C14]]
; CHECK: [[SHL49:%[0-9]+]]:_(s32) = G_SHL [[AND56]], [[C1]](s64)
; CHECK: [[ANYEXT7:%[0-9]+]]:_(s32) = G_ANYEXT [[UV7]](s8)
; CHECK: [[AND57:%[0-9]+]]:_(s32) = G_AND [[ANYEXT7]], [[C14]]
; CHECK: [[COPY147:%[0-9]+]]:_(s32) = COPY [[SHL49]](s32)
; CHECK: [[OR49:%[0-9]+]]:_(s32) = G_OR [[AND57]], [[COPY147]]
; CHECK: [[COPY148:%[0-9]+]]:_(s32) = COPY [[LSHR50]](s32)
; CHECK: [[AND58:%[0-9]+]]:_(s32) = G_AND [[COPY148]], [[C14]]
; CHECK: [[SHL50:%[0-9]+]]:_(s32) = G_SHL [[AND58]], [[C3]](s64)
; CHECK: [[COPY149:%[0-9]+]]:_(s32) = COPY [[OR49]](s32)
; CHECK: [[COPY150:%[0-9]+]]:_(s32) = COPY [[SHL50]](s32)
; CHECK: [[OR50:%[0-9]+]]:_(s32) = G_OR [[COPY149]], [[COPY150]]
; CHECK: [[COPY151:%[0-9]+]]:_(s32) = COPY [[LSHR51]](s32)
; CHECK: [[AND59:%[0-9]+]]:_(s32) = G_AND [[COPY151]], [[C14]]
; CHECK: [[SHL51:%[0-9]+]]:_(s32) = G_SHL [[AND59]], [[C5]](s64)
; CHECK: [[COPY152:%[0-9]+]]:_(s32) = COPY [[OR50]](s32)
; CHECK: [[COPY153:%[0-9]+]]:_(s32) = COPY [[SHL51]](s32)
; CHECK: [[OR51:%[0-9]+]]:_(s32) = G_OR [[COPY152]], [[COPY153]]
; CHECK: [[COPY154:%[0-9]+]]:_(s32) = COPY [[LSHR52]](s32)
; CHECK: [[AND60:%[0-9]+]]:_(s32) = G_AND [[COPY154]], [[C14]]
; CHECK: [[SHL52:%[0-9]+]]:_(s32) = G_SHL [[AND60]], [[C7]](s64)
; CHECK: [[COPY155:%[0-9]+]]:_(s32) = COPY [[OR51]](s32)
; CHECK: [[COPY156:%[0-9]+]]:_(s32) = COPY [[SHL52]](s32)
; CHECK: [[OR52:%[0-9]+]]:_(s32) = G_OR [[COPY155]], [[COPY156]]
; CHECK: [[COPY157:%[0-9]+]]:_(s32) = COPY [[LSHR53]](s32)
; CHECK: [[AND61:%[0-9]+]]:_(s32) = G_AND [[COPY157]], [[C14]]
; CHECK: [[SHL53:%[0-9]+]]:_(s32) = G_SHL [[AND61]], [[C9]](s64)
; CHECK: [[COPY158:%[0-9]+]]:_(s32) = COPY [[OR52]](s32)
; CHECK: [[COPY159:%[0-9]+]]:_(s32) = COPY [[SHL53]](s32)
; CHECK: [[OR53:%[0-9]+]]:_(s32) = G_OR [[COPY158]], [[COPY159]]
; CHECK: [[COPY160:%[0-9]+]]:_(s32) = COPY [[LSHR54]](s32)
; CHECK: [[AND62:%[0-9]+]]:_(s32) = G_AND [[COPY160]], [[C14]]
; CHECK: [[SHL54:%[0-9]+]]:_(s32) = G_SHL [[AND62]], [[C11]](s64)
; CHECK: [[COPY161:%[0-9]+]]:_(s32) = COPY [[OR53]](s32)
; CHECK: [[COPY162:%[0-9]+]]:_(s32) = COPY [[SHL54]](s32)
; CHECK: [[OR54:%[0-9]+]]:_(s32) = G_OR [[COPY161]], [[COPY162]]
; CHECK: [[COPY163:%[0-9]+]]:_(s32) = COPY [[LSHR55]](s32)
; CHECK: [[AND63:%[0-9]+]]:_(s32) = G_AND [[COPY163]], [[C14]]
; CHECK: [[SHL55:%[0-9]+]]:_(s32) = G_SHL [[AND63]], [[C13]](s64)
; CHECK: [[COPY164:%[0-9]+]]:_(s32) = COPY [[OR54]](s32)
; CHECK: [[COPY165:%[0-9]+]]:_(s32) = COPY [[SHL55]](s32)
; CHECK: [[OR55:%[0-9]+]]:_(s32) = G_OR [[COPY164]], [[COPY165]]
; CHECK: [[TRUNC7:%[0-9]+]]:_(s8) = G_TRUNC [[OR55]](s32)
; CHECK: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[TRUNC]](s8), [[TRUNC1]](s8), [[TRUNC2]](s8), [[TRUNC3]](s8), [[TRUNC4]](s8), [[TRUNC5]](s8), [[TRUNC6]](s8), [[TRUNC7]](s8)
; CHECK: [[C15:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
; CHECK: [[SHL56:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C1]](s64)
; CHECK: [[COPY166:%[0-9]+]]:_(s32) = COPY [[UADDE]](s32)
; CHECK: [[AND64:%[0-9]+]]:_(s32) = G_AND [[COPY166]], [[C14]]
; CHECK: [[COPY167:%[0-9]+]]:_(s32) = COPY [[SHL56]](s32)
; CHECK: [[OR56:%[0-9]+]]:_(s32) = G_OR [[AND64]], [[COPY167]]
; CHECK: [[SHL57:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C3]](s64)
; CHECK: [[COPY168:%[0-9]+]]:_(s32) = COPY [[OR56]](s32)
; CHECK: [[COPY169:%[0-9]+]]:_(s32) = COPY [[SHL57]](s32)
; CHECK: [[OR57:%[0-9]+]]:_(s32) = G_OR [[COPY168]], [[COPY169]]
; CHECK: [[SHL58:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C5]](s64)
; CHECK: [[COPY170:%[0-9]+]]:_(s32) = COPY [[OR57]](s32)
; CHECK: [[COPY171:%[0-9]+]]:_(s32) = COPY [[SHL58]](s32)
; CHECK: [[OR58:%[0-9]+]]:_(s32) = G_OR [[COPY170]], [[COPY171]]
; CHECK: [[SHL59:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C7]](s64)
; CHECK: [[COPY172:%[0-9]+]]:_(s32) = COPY [[OR58]](s32)
; CHECK: [[COPY173:%[0-9]+]]:_(s32) = COPY [[SHL59]](s32)
; CHECK: [[OR59:%[0-9]+]]:_(s32) = G_OR [[COPY172]], [[COPY173]]
; CHECK: [[SHL60:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C9]](s64)
; CHECK: [[COPY174:%[0-9]+]]:_(s32) = COPY [[OR59]](s32)
; CHECK: [[COPY175:%[0-9]+]]:_(s32) = COPY [[SHL60]](s32)
; CHECK: [[OR60:%[0-9]+]]:_(s32) = G_OR [[COPY174]], [[COPY175]]
; CHECK: [[SHL61:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C11]](s64)
; CHECK: [[COPY176:%[0-9]+]]:_(s32) = COPY [[OR60]](s32)
; CHECK: [[COPY177:%[0-9]+]]:_(s32) = COPY [[SHL61]](s32)
; CHECK: [[OR61:%[0-9]+]]:_(s32) = G_OR [[COPY176]], [[COPY177]]
; CHECK: [[SHL62:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C13]](s64)
; CHECK: [[COPY178:%[0-9]+]]:_(s32) = COPY [[OR61]](s32)
; CHECK: [[COPY179:%[0-9]+]]:_(s32) = COPY [[SHL62]](s32)
; CHECK: [[OR62:%[0-9]+]]:_(s32) = G_OR [[COPY178]], [[COPY179]]
; CHECK: [[TRUNC8:%[0-9]+]]:_(s8) = G_TRUNC [[OR62]](s32)
; CHECK: [[SHL63:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C1]](s64)
; CHECK: [[COPY180:%[0-9]+]]:_(s32) = COPY [[SHL63]](s32)
; CHECK: [[OR63:%[0-9]+]]:_(s32) = G_OR [[C15]], [[COPY180]]
; CHECK: [[SHL64:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C3]](s64)
; CHECK: [[COPY181:%[0-9]+]]:_(s32) = COPY [[OR63]](s32)
; CHECK: [[COPY182:%[0-9]+]]:_(s32) = COPY [[SHL64]](s32)
; CHECK: [[OR64:%[0-9]+]]:_(s32) = G_OR [[COPY181]], [[COPY182]]
; CHECK: [[SHL65:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C5]](s64)
; CHECK: [[COPY183:%[0-9]+]]:_(s32) = COPY [[OR64]](s32)
; CHECK: [[COPY184:%[0-9]+]]:_(s32) = COPY [[SHL65]](s32)
; CHECK: [[OR65:%[0-9]+]]:_(s32) = G_OR [[COPY183]], [[COPY184]]
; CHECK: [[SHL66:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C7]](s64)
; CHECK: [[COPY185:%[0-9]+]]:_(s32) = COPY [[OR65]](s32)
; CHECK: [[COPY186:%[0-9]+]]:_(s32) = COPY [[SHL66]](s32)
; CHECK: [[OR66:%[0-9]+]]:_(s32) = G_OR [[COPY185]], [[COPY186]]
; CHECK: [[SHL67:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C9]](s64)
; CHECK: [[COPY187:%[0-9]+]]:_(s32) = COPY [[OR66]](s32)
; CHECK: [[COPY188:%[0-9]+]]:_(s32) = COPY [[SHL67]](s32)
; CHECK: [[OR67:%[0-9]+]]:_(s32) = G_OR [[COPY187]], [[COPY188]]
; CHECK: [[SHL68:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C11]](s64)
; CHECK: [[COPY189:%[0-9]+]]:_(s32) = COPY [[OR67]](s32)
; CHECK: [[COPY190:%[0-9]+]]:_(s32) = COPY [[SHL68]](s32)
; CHECK: [[OR68:%[0-9]+]]:_(s32) = G_OR [[COPY189]], [[COPY190]]
; CHECK: [[SHL69:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C13]](s64)
; CHECK: [[COPY191:%[0-9]+]]:_(s32) = COPY [[OR68]](s32)
; CHECK: [[COPY192:%[0-9]+]]:_(s32) = COPY [[SHL69]](s32)
; CHECK: [[OR69:%[0-9]+]]:_(s32) = G_OR [[COPY191]], [[COPY192]]
; CHECK: [[TRUNC9:%[0-9]+]]:_(s8) = G_TRUNC [[OR69]](s32)
; CHECK: [[SHL70:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C1]](s64)
; CHECK: [[COPY193:%[0-9]+]]:_(s32) = COPY [[SHL70]](s32)
; CHECK: [[OR70:%[0-9]+]]:_(s32) = G_OR [[C15]], [[COPY193]]
; CHECK: [[SHL71:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C3]](s64)
; CHECK: [[COPY194:%[0-9]+]]:_(s32) = COPY [[OR70]](s32)
; CHECK: [[COPY195:%[0-9]+]]:_(s32) = COPY [[SHL71]](s32)
; CHECK: [[OR71:%[0-9]+]]:_(s32) = G_OR [[COPY194]], [[COPY195]]
; CHECK: [[SHL72:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C5]](s64)
; CHECK: [[COPY196:%[0-9]+]]:_(s32) = COPY [[OR71]](s32)
; CHECK: [[COPY197:%[0-9]+]]:_(s32) = COPY [[SHL72]](s32)
; CHECK: [[OR72:%[0-9]+]]:_(s32) = G_OR [[COPY196]], [[COPY197]]
; CHECK: [[SHL73:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C7]](s64)
; CHECK: [[COPY198:%[0-9]+]]:_(s32) = COPY [[OR72]](s32)
; CHECK: [[COPY199:%[0-9]+]]:_(s32) = COPY [[SHL73]](s32)
; CHECK: [[OR73:%[0-9]+]]:_(s32) = G_OR [[COPY198]], [[COPY199]]
; CHECK: [[SHL74:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C9]](s64)
; CHECK: [[COPY200:%[0-9]+]]:_(s32) = COPY [[OR73]](s32)
; CHECK: [[COPY201:%[0-9]+]]:_(s32) = COPY [[SHL74]](s32)
; CHECK: [[OR74:%[0-9]+]]:_(s32) = G_OR [[COPY200]], [[COPY201]]
; CHECK: [[SHL75:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C11]](s64)
; CHECK: [[COPY202:%[0-9]+]]:_(s32) = COPY [[OR74]](s32)
; CHECK: [[COPY203:%[0-9]+]]:_(s32) = COPY [[SHL75]](s32)
; CHECK: [[OR75:%[0-9]+]]:_(s32) = G_OR [[COPY202]], [[COPY203]]
; CHECK: [[SHL76:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C13]](s64)
; CHECK: [[COPY204:%[0-9]+]]:_(s32) = COPY [[OR75]](s32)
; CHECK: [[COPY205:%[0-9]+]]:_(s32) = COPY [[SHL76]](s32)
; CHECK: [[OR76:%[0-9]+]]:_(s32) = G_OR [[COPY204]], [[COPY205]]
; CHECK: [[TRUNC10:%[0-9]+]]:_(s8) = G_TRUNC [[OR76]](s32)
; CHECK: [[SHL77:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C1]](s64)
; CHECK: [[COPY206:%[0-9]+]]:_(s32) = COPY [[SHL77]](s32)
; CHECK: [[OR77:%[0-9]+]]:_(s32) = G_OR [[C15]], [[COPY206]]
; CHECK: [[SHL78:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C3]](s64)
; CHECK: [[COPY207:%[0-9]+]]:_(s32) = COPY [[OR77]](s32)
; CHECK: [[COPY208:%[0-9]+]]:_(s32) = COPY [[SHL78]](s32)
; CHECK: [[OR78:%[0-9]+]]:_(s32) = G_OR [[COPY207]], [[COPY208]]
; CHECK: [[SHL79:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C5]](s64)
; CHECK: [[COPY209:%[0-9]+]]:_(s32) = COPY [[OR78]](s32)
; CHECK: [[COPY210:%[0-9]+]]:_(s32) = COPY [[SHL79]](s32)
; CHECK: [[OR79:%[0-9]+]]:_(s32) = G_OR [[COPY209]], [[COPY210]]
; CHECK: [[SHL80:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C7]](s64)
; CHECK: [[COPY211:%[0-9]+]]:_(s32) = COPY [[OR79]](s32)
; CHECK: [[COPY212:%[0-9]+]]:_(s32) = COPY [[SHL80]](s32)
; CHECK: [[OR80:%[0-9]+]]:_(s32) = G_OR [[COPY211]], [[COPY212]]
; CHECK: [[SHL81:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C9]](s64)
; CHECK: [[COPY213:%[0-9]+]]:_(s32) = COPY [[OR80]](s32)
; CHECK: [[COPY214:%[0-9]+]]:_(s32) = COPY [[SHL81]](s32)
; CHECK: [[OR81:%[0-9]+]]:_(s32) = G_OR [[COPY213]], [[COPY214]]
; CHECK: [[SHL82:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C11]](s64)
; CHECK: [[COPY215:%[0-9]+]]:_(s32) = COPY [[OR81]](s32)
; CHECK: [[COPY216:%[0-9]+]]:_(s32) = COPY [[SHL82]](s32)
; CHECK: [[OR82:%[0-9]+]]:_(s32) = G_OR [[COPY215]], [[COPY216]]
; CHECK: [[SHL83:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C13]](s64)
; CHECK: [[COPY217:%[0-9]+]]:_(s32) = COPY [[OR82]](s32)
; CHECK: [[COPY218:%[0-9]+]]:_(s32) = COPY [[SHL83]](s32)
; CHECK: [[OR83:%[0-9]+]]:_(s32) = G_OR [[COPY217]], [[COPY218]]
; CHECK: [[TRUNC11:%[0-9]+]]:_(s8) = G_TRUNC [[OR83]](s32)
; CHECK: [[SHL84:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C1]](s64)
; CHECK: [[COPY219:%[0-9]+]]:_(s32) = COPY [[SHL84]](s32)
; CHECK: [[OR84:%[0-9]+]]:_(s32) = G_OR [[C15]], [[COPY219]]
; CHECK: [[SHL85:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C3]](s64)
; CHECK: [[COPY220:%[0-9]+]]:_(s32) = COPY [[OR84]](s32)
; CHECK: [[COPY221:%[0-9]+]]:_(s32) = COPY [[SHL85]](s32)
; CHECK: [[OR85:%[0-9]+]]:_(s32) = G_OR [[COPY220]], [[COPY221]]
; CHECK: [[SHL86:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C5]](s64)
; CHECK: [[COPY222:%[0-9]+]]:_(s32) = COPY [[OR85]](s32)
; CHECK: [[COPY223:%[0-9]+]]:_(s32) = COPY [[SHL86]](s32)
; CHECK: [[OR86:%[0-9]+]]:_(s32) = G_OR [[COPY222]], [[COPY223]]
; CHECK: [[SHL87:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C7]](s64)
; CHECK: [[COPY224:%[0-9]+]]:_(s32) = COPY [[OR86]](s32)
; CHECK: [[COPY225:%[0-9]+]]:_(s32) = COPY [[SHL87]](s32)
; CHECK: [[OR87:%[0-9]+]]:_(s32) = G_OR [[COPY224]], [[COPY225]]
; CHECK: [[SHL88:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C9]](s64)
; CHECK: [[COPY226:%[0-9]+]]:_(s32) = COPY [[OR87]](s32)
; CHECK: [[COPY227:%[0-9]+]]:_(s32) = COPY [[SHL88]](s32)
; CHECK: [[OR88:%[0-9]+]]:_(s32) = G_OR [[COPY226]], [[COPY227]]
; CHECK: [[SHL89:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C11]](s64)
; CHECK: [[COPY228:%[0-9]+]]:_(s32) = COPY [[OR88]](s32)
; CHECK: [[COPY229:%[0-9]+]]:_(s32) = COPY [[SHL89]](s32)
; CHECK: [[OR89:%[0-9]+]]:_(s32) = G_OR [[COPY228]], [[COPY229]]
; CHECK: [[SHL90:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C13]](s64)
; CHECK: [[COPY230:%[0-9]+]]:_(s32) = COPY [[OR89]](s32)
; CHECK: [[COPY231:%[0-9]+]]:_(s32) = COPY [[SHL90]](s32)
; CHECK: [[OR90:%[0-9]+]]:_(s32) = G_OR [[COPY230]], [[COPY231]]
; CHECK: [[TRUNC12:%[0-9]+]]:_(s8) = G_TRUNC [[OR90]](s32)
; CHECK: [[SHL91:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C1]](s64)
; CHECK: [[COPY232:%[0-9]+]]:_(s32) = COPY [[SHL91]](s32)
; CHECK: [[OR91:%[0-9]+]]:_(s32) = G_OR [[C15]], [[COPY232]]
; CHECK: [[SHL92:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C3]](s64)
; CHECK: [[COPY233:%[0-9]+]]:_(s32) = COPY [[OR91]](s32)
; CHECK: [[COPY234:%[0-9]+]]:_(s32) = COPY [[SHL92]](s32)
; CHECK: [[OR92:%[0-9]+]]:_(s32) = G_OR [[COPY233]], [[COPY234]]
; CHECK: [[SHL93:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C5]](s64)
; CHECK: [[COPY235:%[0-9]+]]:_(s32) = COPY [[OR92]](s32)
; CHECK: [[COPY236:%[0-9]+]]:_(s32) = COPY [[SHL93]](s32)
; CHECK: [[OR93:%[0-9]+]]:_(s32) = G_OR [[COPY235]], [[COPY236]]
; CHECK: [[SHL94:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C7]](s64)
; CHECK: [[COPY237:%[0-9]+]]:_(s32) = COPY [[OR93]](s32)
; CHECK: [[COPY238:%[0-9]+]]:_(s32) = COPY [[SHL94]](s32)
; CHECK: [[OR94:%[0-9]+]]:_(s32) = G_OR [[COPY237]], [[COPY238]]
; CHECK: [[SHL95:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C9]](s64)
; CHECK: [[COPY239:%[0-9]+]]:_(s32) = COPY [[OR94]](s32)
; CHECK: [[COPY240:%[0-9]+]]:_(s32) = COPY [[SHL95]](s32)
; CHECK: [[OR95:%[0-9]+]]:_(s32) = G_OR [[COPY239]], [[COPY240]]
; CHECK: [[SHL96:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C11]](s64)
; CHECK: [[COPY241:%[0-9]+]]:_(s32) = COPY [[OR95]](s32)
; CHECK: [[COPY242:%[0-9]+]]:_(s32) = COPY [[SHL96]](s32)
; CHECK: [[OR96:%[0-9]+]]:_(s32) = G_OR [[COPY241]], [[COPY242]]
; CHECK: [[SHL97:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C13]](s64)
; CHECK: [[COPY243:%[0-9]+]]:_(s32) = COPY [[OR96]](s32)
; CHECK: [[COPY244:%[0-9]+]]:_(s32) = COPY [[SHL97]](s32)
; CHECK: [[OR97:%[0-9]+]]:_(s32) = G_OR [[COPY243]], [[COPY244]]
; CHECK: [[TRUNC13:%[0-9]+]]:_(s8) = G_TRUNC [[OR97]](s32)
; CHECK: [[SHL98:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C1]](s64)
; CHECK: [[COPY245:%[0-9]+]]:_(s32) = COPY [[SHL98]](s32)
; CHECK: [[OR98:%[0-9]+]]:_(s32) = G_OR [[C15]], [[COPY245]]
; CHECK: [[SHL99:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C3]](s64)
; CHECK: [[COPY246:%[0-9]+]]:_(s32) = COPY [[OR98]](s32)
; CHECK: [[COPY247:%[0-9]+]]:_(s32) = COPY [[SHL99]](s32)
; CHECK: [[OR99:%[0-9]+]]:_(s32) = G_OR [[COPY246]], [[COPY247]]
; CHECK: [[SHL100:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C5]](s64)
; CHECK: [[COPY248:%[0-9]+]]:_(s32) = COPY [[OR99]](s32)
; CHECK: [[COPY249:%[0-9]+]]:_(s32) = COPY [[SHL100]](s32)
; CHECK: [[OR100:%[0-9]+]]:_(s32) = G_OR [[COPY248]], [[COPY249]]
; CHECK: [[SHL101:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C7]](s64)
; CHECK: [[COPY250:%[0-9]+]]:_(s32) = COPY [[OR100]](s32)
; CHECK: [[COPY251:%[0-9]+]]:_(s32) = COPY [[SHL101]](s32)
; CHECK: [[OR101:%[0-9]+]]:_(s32) = G_OR [[COPY250]], [[COPY251]]
; CHECK: [[SHL102:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C9]](s64)
; CHECK: [[COPY252:%[0-9]+]]:_(s32) = COPY [[OR101]](s32)
; CHECK: [[COPY253:%[0-9]+]]:_(s32) = COPY [[SHL102]](s32)
; CHECK: [[OR102:%[0-9]+]]:_(s32) = G_OR [[COPY252]], [[COPY253]]
; CHECK: [[SHL103:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C11]](s64)
; CHECK: [[COPY254:%[0-9]+]]:_(s32) = COPY [[OR102]](s32)
; CHECK: [[COPY255:%[0-9]+]]:_(s32) = COPY [[SHL103]](s32)
; CHECK: [[OR103:%[0-9]+]]:_(s32) = G_OR [[COPY254]], [[COPY255]]
; CHECK: [[SHL104:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C13]](s64)
; CHECK: [[COPY256:%[0-9]+]]:_(s32) = COPY [[OR103]](s32)
; CHECK: [[COPY257:%[0-9]+]]:_(s32) = COPY [[SHL104]](s32)
; CHECK: [[OR104:%[0-9]+]]:_(s32) = G_OR [[COPY256]], [[COPY257]]
; CHECK: [[TRUNC14:%[0-9]+]]:_(s8) = G_TRUNC [[OR104]](s32)
; CHECK: [[SHL105:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C1]](s64)
; CHECK: [[COPY258:%[0-9]+]]:_(s32) = COPY [[SHL105]](s32)
; CHECK: [[OR105:%[0-9]+]]:_(s32) = G_OR [[C15]], [[COPY258]]
; CHECK: [[SHL106:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C3]](s64)
; CHECK: [[COPY259:%[0-9]+]]:_(s32) = COPY [[OR105]](s32)
; CHECK: [[COPY260:%[0-9]+]]:_(s32) = COPY [[SHL106]](s32)
; CHECK: [[OR106:%[0-9]+]]:_(s32) = G_OR [[COPY259]], [[COPY260]]
; CHECK: [[SHL107:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C5]](s64)
; CHECK: [[COPY261:%[0-9]+]]:_(s32) = COPY [[OR106]](s32)
; CHECK: [[COPY262:%[0-9]+]]:_(s32) = COPY [[SHL107]](s32)
; CHECK: [[OR107:%[0-9]+]]:_(s32) = G_OR [[COPY261]], [[COPY262]]
; CHECK: [[SHL108:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C7]](s64)
; CHECK: [[COPY263:%[0-9]+]]:_(s32) = COPY [[OR107]](s32)
; CHECK: [[COPY264:%[0-9]+]]:_(s32) = COPY [[SHL108]](s32)
; CHECK: [[OR108:%[0-9]+]]:_(s32) = G_OR [[COPY263]], [[COPY264]]
; CHECK: [[SHL109:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C9]](s64)
; CHECK: [[COPY265:%[0-9]+]]:_(s32) = COPY [[OR108]](s32)
; CHECK: [[COPY266:%[0-9]+]]:_(s32) = COPY [[SHL109]](s32)
; CHECK: [[OR109:%[0-9]+]]:_(s32) = G_OR [[COPY265]], [[COPY266]]
; CHECK: [[SHL110:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C11]](s64)
; CHECK: [[COPY267:%[0-9]+]]:_(s32) = COPY [[OR109]](s32)
; CHECK: [[COPY268:%[0-9]+]]:_(s32) = COPY [[SHL110]](s32)
; CHECK: [[OR110:%[0-9]+]]:_(s32) = G_OR [[COPY267]], [[COPY268]]
; CHECK: [[SHL111:%[0-9]+]]:_(s32) = G_SHL [[C15]], [[C13]](s64)
; CHECK: [[COPY269:%[0-9]+]]:_(s32) = COPY [[OR110]](s32)
; CHECK: [[COPY270:%[0-9]+]]:_(s32) = COPY [[SHL111]](s32)
; CHECK: [[OR111:%[0-9]+]]:_(s32) = G_OR [[COPY269]], [[COPY270]]
; CHECK: [[TRUNC15:%[0-9]+]]:_(s8) = G_TRUNC [[OR111]](s32)
; CHECK: [[MV1:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[TRUNC8]](s8), [[TRUNC9]](s8), [[TRUNC10]](s8), [[TRUNC11]](s8), [[TRUNC12]](s8), [[TRUNC13]](s8), [[TRUNC14]](s8), [[TRUNC15]](s8)
; CHECK: $x0 = COPY [[MV]](s64)
; CHECK: $x1 = COPY [[MV1]](s64)
; CHECK: [[UADDO:%[0-9]+]]:_(s64), [[UADDO1:%[0-9]+]]:_(s1) = G_UADDO [[COPY]], [[COPY2]]
; CHECK: [[UADDE:%[0-9]+]]:_(s64), [[UADDE1:%[0-9]+]]:_(s1) = G_UADDE [[COPY1]], [[COPY3]], [[UADDO1]]
; CHECK: $x0 = COPY [[UADDO]](s64)
; CHECK: $x1 = COPY [[UADDE]](s64)
%0:_(s64) = COPY $x0
%1:_(s64) = COPY $x1
%2:_(s64) = COPY $x2

View File

@ -25,3 +25,109 @@ body: |
$x0 = COPY %5(s64)
...
---
name: test_nonpow2
body: |
bb.0.entry:
; CHECK-LABEL: name: test_nonpow2
; CHECK: %ptr:_(p0) = COPY $x0
; CHECK: [[LOAD:%[0-9]+]]:_(s64) = G_LOAD %ptr(p0) :: (load (s64), align 16)
; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 8
; CHECK: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD %ptr, [[C1]](s64)
; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY [[PTR_ADD]](p0)
; CHECK: [[ZEXTLOAD:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[COPY]](p0) :: (load (s16) from unknown-address + 8, align 8)
; CHECK: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
; CHECK: [[PTR_ADD1:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY]], [[C2]](s64)
; CHECK: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD1]](p0) :: (load (s8) from unknown-address + 10, align 2)
; CHECK: [[DEF:%[0-9]+]]:_(s32) = G_IMPLICIT_DEF
; CHECK: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD1]](s32), [[DEF]](s32)
; CHECK: [[DEF1:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
; CHECK: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
; CHECK: [[C4:%[0-9]+]]:_(s64) = G_CONSTANT i64 64
; CHECK: [[SUB:%[0-9]+]]:_(s64) = G_SUB [[C3]], [[C4]]
; CHECK: [[SUB1:%[0-9]+]]:_(s64) = G_SUB [[C4]], [[C3]]
; CHECK: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[C3]](s64), [[C4]]
; CHECK: [[TRUNC:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP]](s32)
; CHECK: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[C3]](s64), [[C]]
; CHECK: [[TRUNC1:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP1]](s32)
; CHECK: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[MV]], [[C3]](s64)
; CHECK: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[MV]], [[SUB1]](s64)
; CHECK: [[SHL1:%[0-9]+]]:_(s64) = G_SHL [[DEF1]], [[C3]](s64)
; CHECK: [[OR:%[0-9]+]]:_(s64) = G_OR [[LSHR]], [[SHL1]]
; CHECK: [[SHL2:%[0-9]+]]:_(s64) = G_SHL [[MV]], [[SUB]](s64)
; CHECK: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC]](s1), [[SHL]], [[C]]
; CHECK: [[SELECT1:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC]](s1), [[OR]], [[SHL2]]
; CHECK: [[SELECT2:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC1]](s1), [[DEF1]], [[SELECT1]]
; CHECK: [[OR1:%[0-9]+]]:_(s64) = G_OR [[SELECT]], [[ZEXTLOAD]]
; CHECK: [[OR2:%[0-9]+]]:_(s64) = G_OR [[SELECT2]], [[C]]
; CHECK: [[SUB2:%[0-9]+]]:_(s64) = G_SUB [[C4]], [[C4]]
; CHECK: [[SUB3:%[0-9]+]]:_(s64) = G_SUB [[C4]], [[C4]]
; CHECK: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[C4]](s64), [[C4]]
; CHECK: [[TRUNC2:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP2]](s32)
; CHECK: [[ICMP3:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[C4]](s64), [[C]]
; CHECK: [[TRUNC3:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP3]](s32)
; CHECK: [[SHL3:%[0-9]+]]:_(s64) = G_SHL [[OR1]], [[C4]](s64)
; CHECK: [[LSHR1:%[0-9]+]]:_(s64) = G_LSHR [[OR1]], [[SUB3]](s64)
; CHECK: [[SHL4:%[0-9]+]]:_(s64) = G_SHL [[OR2]], [[C4]](s64)
; CHECK: [[OR3:%[0-9]+]]:_(s64) = G_OR [[LSHR1]], [[SHL4]]
; CHECK: [[SHL5:%[0-9]+]]:_(s64) = G_SHL [[OR1]], [[SUB2]](s64)
; CHECK: [[SELECT3:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC2]](s1), [[SHL3]], [[C]]
; CHECK: [[SELECT4:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC2]](s1), [[OR3]], [[SHL5]]
; CHECK: [[SELECT5:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC3]](s1), [[OR2]], [[SELECT4]]
; CHECK: [[OR4:%[0-9]+]]:_(s64) = G_OR [[SELECT3]], [[LOAD]]
; CHECK: [[OR5:%[0-9]+]]:_(s64) = G_OR [[SELECT5]], [[C]]
; CHECK: [[LOAD2:%[0-9]+]]:_(s64) = G_LOAD %ptr(p0) :: (load (s64), align 16)
; CHECK: [[COPY1:%[0-9]+]]:_(p0) = COPY [[PTR_ADD]](p0)
; CHECK: [[ZEXTLOAD1:%[0-9]+]]:_(s64) = G_ZEXTLOAD [[COPY1]](p0) :: (load (s16) from unknown-address + 8, align 8)
; CHECK: [[PTR_ADD2:%[0-9]+]]:_(p0) = G_PTR_ADD [[COPY1]], [[C2]](s64)
; CHECK: [[LOAD3:%[0-9]+]]:_(s32) = G_LOAD [[PTR_ADD2]](p0) :: (load (s8) from unknown-address + 10, align 2)
; CHECK: [[MV1:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD3]](s32), [[DEF]](s32)
; CHECK: [[SUB4:%[0-9]+]]:_(s64) = G_SUB [[C3]], [[C4]]
; CHECK: [[SUB5:%[0-9]+]]:_(s64) = G_SUB [[C4]], [[C3]]
; CHECK: [[ICMP4:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[C3]](s64), [[C4]]
; CHECK: [[TRUNC4:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP4]](s32)
; CHECK: [[ICMP5:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[C3]](s64), [[C]]
; CHECK: [[TRUNC5:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP5]](s32)
; CHECK: [[SHL6:%[0-9]+]]:_(s64) = G_SHL [[MV1]], [[C3]](s64)
; CHECK: [[LSHR2:%[0-9]+]]:_(s64) = G_LSHR [[MV1]], [[SUB5]](s64)
; CHECK: [[SHL7:%[0-9]+]]:_(s64) = G_SHL [[DEF1]], [[C3]](s64)
; CHECK: [[OR6:%[0-9]+]]:_(s64) = G_OR [[LSHR2]], [[SHL7]]
; CHECK: [[SHL8:%[0-9]+]]:_(s64) = G_SHL [[MV1]], [[SUB4]](s64)
; CHECK: [[SELECT6:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC4]](s1), [[SHL6]], [[C]]
; CHECK: [[SELECT7:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC4]](s1), [[OR6]], [[SHL8]]
; CHECK: [[SELECT8:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC5]](s1), [[DEF1]], [[SELECT7]]
; CHECK: [[OR7:%[0-9]+]]:_(s64) = G_OR [[SELECT6]], [[ZEXTLOAD1]]
; CHECK: [[OR8:%[0-9]+]]:_(s64) = G_OR [[SELECT8]], [[C]]
; CHECK: [[SUB6:%[0-9]+]]:_(s64) = G_SUB [[C4]], [[C4]]
; CHECK: [[SUB7:%[0-9]+]]:_(s64) = G_SUB [[C4]], [[C4]]
; CHECK: [[ICMP6:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[C4]](s64), [[C4]]
; CHECK: [[TRUNC6:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP6]](s32)
; CHECK: [[ICMP7:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[C4]](s64), [[C]]
; CHECK: [[TRUNC7:%[0-9]+]]:_(s1) = G_TRUNC [[ICMP7]](s32)
; CHECK: [[SHL9:%[0-9]+]]:_(s64) = G_SHL [[OR7]], [[C4]](s64)
; CHECK: [[LSHR3:%[0-9]+]]:_(s64) = G_LSHR [[OR7]], [[SUB7]](s64)
; CHECK: [[SHL10:%[0-9]+]]:_(s64) = G_SHL [[OR8]], [[C4]](s64)
; CHECK: [[OR9:%[0-9]+]]:_(s64) = G_OR [[LSHR3]], [[SHL10]]
; CHECK: [[SHL11:%[0-9]+]]:_(s64) = G_SHL [[OR7]], [[SUB6]](s64)
; CHECK: [[SELECT9:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC6]](s1), [[SHL9]], [[C]]
; CHECK: [[SELECT10:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC6]](s1), [[OR9]], [[SHL11]]
; CHECK: [[SELECT11:%[0-9]+]]:_(s64) = G_SELECT [[TRUNC7]](s1), [[OR8]], [[SELECT10]]
; CHECK: [[OR10:%[0-9]+]]:_(s64) = G_OR [[SELECT9]], [[LOAD2]]
; CHECK: [[OR11:%[0-9]+]]:_(s64) = G_OR [[SELECT11]], [[C]]
; CHECK: [[AND:%[0-9]+]]:_(s64) = G_AND [[OR4]], [[OR10]]
; CHECK: [[AND1:%[0-9]+]]:_(s64) = G_AND [[OR5]], [[OR11]]
; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY [[AND]](s64)
; CHECK: [[TRUNC8:%[0-9]+]]:_(s32) = G_TRUNC [[AND1]](s64)
; CHECK: G_STORE [[COPY2]](s64), %ptr(p0) :: (store (s64), align 16)
; CHECK: [[COPY3:%[0-9]+]]:_(s32) = COPY [[TRUNC8]](s32)
; CHECK: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR [[COPY3]], [[C3]](s64)
; CHECK: [[PTR_ADD3:%[0-9]+]]:_(p0) = G_PTR_ADD [[PTR_ADD]], [[C2]](s64)
; CHECK: G_STORE [[COPY3]](s32), [[PTR_ADD]](p0) :: (store (s16) into unknown-address + 8, align 8)
; CHECK: G_STORE [[LSHR4]](s32), [[PTR_ADD3]](p0) :: (store (s8) into unknown-address + 10, align 2)
%ptr:_(p0) = COPY $x0
%a:_(s88) = G_LOAD %ptr(p0) :: (load (s88))
%b:_(s88) = G_LOAD %ptr(p0) :: (load (s88))
%and:_(s88) = G_AND %a, %b
G_STORE %and(s88), %ptr(p0) :: (store (s88))
...