llvm/llvm/test/CodeGen/X86/statepoint-invoke-ra-remove-back-copies.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# REQUIRES: asserts
# RUN: llc -x mir -run-pass=greedy -verify-machineinstrs < %s 2>&1  | FileCheck %s

# CHECK-NOT: Cannot move stop beyond start
--- |
  source_filename = "remove-back-copies.ll"
  target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
  target triple = "x86_64-unknown-linux-gnu"

  define void @hoge(ptr addrspace(1) %arg) gc "statepoint-example" personality ptr @widget {
  bb:
    %tmp = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2, i32 5, ptr nonnull elementtype(void (ptr addrspace(1), ptr addrspace(1))) @quux, i32 2, i32 0, ptr addrspace(1) %arg, ptr addrspace(1) undef, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 6, i32 0, i32 4, i32 1, i32 0, ptr addrspace(1) %arg, i32 7, ptr null, i32 0, ptr addrspace(1) %arg, i32 7, ptr null, i32 0, ptr addrspace(1) %arg, i32 2, i32 1, i32 5, i32 0, i32 2, i32 0, i32 7, ptr null, i32 7, ptr null), "gc-live"(ptr addrspace(1) %arg) ]
    %tmp1 = load atomic ptr addrspace(1), ptr addrspace(1) undef unordered, align 8
    %tmp2 = ptrtoint ptr addrspace(1) %tmp1 to i64
    %tmp3 = xor i64 %tmp2, -1
    %tmp4 = inttoptr i64 %tmp3 to ptr addrspace(1)
    %tmp5 = select i1 false, ptr addrspace(1) null, ptr addrspace(1) %tmp4
    br i1 undef, label %bb6, label %bb40

  bb6:                                              ; preds = %bb
    br label %bb7

  bb7:                                              ; preds = %bb27, %bb6
    %tmp9 = phi ptr addrspace(1) [ undef, %bb6 ], [ %tmp28, %bb27 ]
    %tmp10 = phi ptr addrspace(1) [ undef, %bb6 ], [ %tmp29, %bb27 ]
    %tmp11 = phi ptr addrspace(1) [ undef, %bb6 ], [ %tmp30, %bb27 ]
    %tmp12 = phi i32 [ 0, %bb6 ], [ %tmp16, %bb27 ]
    %tmp13 = load atomic i32, ptr addrspace(1) undef unordered, align 8
    %tmp14 = sub i32 %tmp13, 0
    %tmp15 = select i1 false, i32 %tmp14, i32 undef
    %tmp16 = add i32 %tmp15, %tmp12
    %tmp17 = icmp sgt i32 %tmp12, %tmp16
    %tmp18 = or i1 undef, %tmp17
    %tmp19 = or i1 undef, %tmp18
    br i1 %tmp19, label %bb41, label %bb20

  bb20:                                             ; preds = %bb7
    br i1 undef, label %bb27, label %bb23

  bb23:                                             ; preds = %bb20
    %tmp24 = invoke token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 1, i32 16, ptr nonnull elementtype(void (i32, ptr addrspace(1), ptr addrspace(1), i32, i32)) @barney, i32 5, i32 0, i32 undef, ptr addrspace(1) nonnull undef, ptr addrspace(1) null, i32 0, i32 undef, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, ptr null, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp11, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp11, i32 10, i32 2, i32 12, i32 0, i32 3, i32 1, i32 0, ptr addrspace(1) %tmp11, i32 0, ptr addrspace(1) %tmp11, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp11, i32 2, i32 8, i32 4, i32 0, i32 1, i32 0, i32 7, ptr null, i32 2, i32 12, i32 7, i32 0, i32 2, i32 0, i32 7, ptr null, i32 7, ptr null, i32 10, i32 18, i32 96, i32 0, i32 9, i32 1, i32 0, ptr addrspace(1) %tmp10, i32 0, ptr addrspace(1) undef, i32 7, ptr null, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp9, i32 3, i32 %tmp16, i32 3, i32 0, i32 7, ptr null, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp9, i32 8, i32 9, i32 34, i32 0, i32 3, i32 1, i32 0, ptr addrspace(1) %tmp10, i32 0, ptr addrspace(1) undef, i32 7, ptr null, i32 0, ptr addrspace(1) undef), "gc-live"(ptr addrspace(1) %tmp11, ptr addrspace(1) %tmp9, ptr addrspace(1) undef, ptr addrspace(1) %tmp10, ptr addrspace(1) undef, ptr addrspace(1) %tmp5) ]
            to label %bb25 unwind label %bb35

  bb25:                                             ; preds = %bb23
    %tmp26 = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %tmp24, i32 5, i32 5) ; (%tmp5, %tmp5)
    br label %bb27

  bb27:                                             ; preds = %bb25, %bb20
    %tmp28 = phi ptr addrspace(1) [ %tmp9, %bb20 ], [ undef, %bb25 ]
    %tmp29 = phi ptr addrspace(1) [ %tmp10, %bb20 ], [ undef, %bb25 ]
    %tmp30 = phi ptr addrspace(1) [ %tmp11, %bb20 ], [ null, %bb25 ]
    %tmp34 = icmp sgt i32 0, %tmp16
    br i1 %tmp34, label %bb7, label %bb44

  bb35:                                             ; preds = %bb23
    %tmp36 = landingpad token
            cleanup
    br i1 undef, label %bb39, label %bb37

  bb37:                                             ; preds = %bb35
    %tmp38 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr nonnull elementtype(void (i32)) @ham, i32 1, i32 2, i32 3, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, ptr null, i32 7, ptr null, i32 0, ptr addrspace(1) undef, i32 7, ptr null, i32 0, ptr addrspace(1) undef, i32 10, i32 2, i32 12, i32 0, i32 3, i32 1, i32 0, ptr addrspace(1) undef, i32 0, ptr addrspace(1) undef, i32 7, ptr null, i32 0, ptr addrspace(1) undef, i32 2, i32 8, i32 4, i32 0, i32 1, i32 0, i32 7, ptr null, i32 2, i32 12, i32 7, i32 0, i32 2, i32 0, i32 7, ptr null, i32 7, ptr null, i32 10, i32 18, i32 96, i32 0, i32 9, i32 1, i32 0, ptr addrspace(1) undef, i32 0, ptr addrspace(1) undef, i32 7, ptr null, i32 7, ptr null, i32 0, ptr addrspace(1) undef, i32 3, i32 %tmp16, i32 3, i32 0, i32 7, ptr null, i32 7, ptr null, i32 0, ptr addrspace(1) undef, i32 0, i32 9, i32 51, i32 0, i32 3, i32 0, i32 7, ptr null, i32 7, ptr null, i32 7, ptr null), "gc-live"() ]
    unreachable

  bb39:                                             ; preds = %bb35
    unreachable

  bb40:                                             ; preds = %bb
    call void @wombat()
    br label %bb41

  bb41:                                             ; preds = %bb7, %bb40
    %tmp42 = phi i32 [ 0, %bb40 ], [ %tmp12, %bb7 ]
    %tmp43 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr nonnull elementtype(void (i32)) @ham, i32 1, i32 2, i32 -39, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, ptr null, i32 7, ptr null, i32 0, ptr addrspace(1) undef, i32 7, ptr null, i32 0, ptr addrspace(1) undef, i32 10, i32 2, i32 12, i32 0, i32 3, i32 1, i32 0, ptr addrspace(1) undef, i32 0, ptr addrspace(1) undef, i32 7, ptr null, i32 0, ptr addrspace(1) undef, i32 2, i32 8, i32 4, i32 0, i32 1, i32 0, i32 7, ptr null, i32 2, i32 12, i32 7, i32 0, i32 2, i32 0, i32 7, ptr null, i32 7, ptr null, i32 10, i32 18, i32 63, i32 0, i32 9, i32 1, i32 0, ptr addrspace(1) undef, i32 0, ptr addrspace(1) undef, i32 7, ptr null, i32 7, ptr null, i32 0, ptr addrspace(1) undef, i32 3, i32 %tmp42, i32 3, i32 0, i32 3, i32 undef, i32 7, ptr null, i32 0, ptr addrspace(1) undef, i32 2, i32 33, i32 6, i32 0, i32 5, i32 0, i32 0, ptr addrspace(1) undef, i32 3, i32 %tmp42, i32 3, i32 undef, i32 0, ptr addrspace(1) undef, i32 3, i32 undef, i32 1, i32 34, i32 14, i32 0, i32 3, i32 0, i32 3, i32 %tmp42, i32 3, i32 undef, i32 3, i32 0), "gc-live"() ]
    unreachable

  bb44:                                             ; preds = %bb27
    call void @hoge.1()
    br i1 undef, label %bb50, label %bb45

  bb45:                                             ; preds = %bb44
    br i1 undef, label %bb56, label %bb46

  bb46:                                             ; preds = %bb45
    %tmp47 = invoke token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 1, i32 16, ptr nonnull elementtype(void (i32, ptr addrspace(1), ptr addrspace(1), i32, i32)) @barney, i32 5, i32 0, i32 undef, ptr addrspace(1) nonnull undef, ptr addrspace(1) undef, i32 0, i32 undef, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, ptr null, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp30, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp30, i32 10, i32 2, i32 19, i32 0, i32 3, i32 1, i32 0, ptr addrspace(1) %tmp30, i32 0, ptr addrspace(1) %tmp30, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp30, i32 8, i32 9, i32 34, i32 0, i32 3, i32 1, i32 0, ptr addrspace(1) undef, i32 0, ptr addrspace(1) undef, i32 7, ptr null, i32 0, ptr addrspace(1) undef), "gc-live"(ptr addrspace(1) %tmp30, ptr addrspace(1) undef, ptr addrspace(1) undef) ]
            to label %bb48 unwind label %bb52

  bb48:                                             ; preds = %bb46
    %tmp49 = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %tmp47, i32 0, i32 0) ; (%tmp30, %tmp30)
    br label %bb56

  bb50:                                             ; preds = %bb44
    %tmp51 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr nonnull elementtype(void (i32)) @ham, i32 1, i32 2, i32 10, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, ptr null, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp30, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp30, i32 10, i32 2, i32 19, i32 0, i32 3, i32 1, i32 0, ptr addrspace(1) %tmp30, i32 0, ptr addrspace(1) %tmp30, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp30, i32 1, i32 9, i32 6, i32 1, i32 3, i32 0, i32 0, ptr addrspace(1) null, i32 0, ptr addrspace(1) undef, i32 0, ptr addrspace(1) null, i32 7, ptr null), "gc-live"() ]
    unreachable

  bb52:                                             ; preds = %bb46
    %tmp53 = landingpad token
            cleanup
    %tmp54 = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %tmp53, i32 0, i32 0) ; (%tmp30, %tmp30)
    %tmp55 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr nonnull elementtype(void (i32)) @ham, i32 1, i32 2, i32 3, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, ptr null, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp54, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp54, i32 10, i32 2, i32 19, i32 0, i32 3, i32 1, i32 0, ptr addrspace(1) %tmp54, i32 0, ptr addrspace(1) %tmp54, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp54, i32 0, i32 9, i32 51, i32 0, i32 3, i32 0, i32 7, ptr null, i32 7, ptr null, i32 7, ptr null), "gc-live"() ]
    unreachable

  bb56:                                             ; preds = %bb48, %bb45
    %tmp57 = phi ptr addrspace(1) [ %tmp30, %bb45 ], [ %tmp49, %bb48 ]
    %tmp58 = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr nonnull elementtype(void (i32)) @ham, i32 1, i32 2, i32 10, i32 0, i32 0) [ "deopt"(i32 0, i32 10, i32 0, i32 10, i32 0, i32 4, i32 1, i32 7, ptr null, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp57, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp57, i32 9, i32 2, i32 26, i32 1, i32 3, i32 1, i32 0, ptr addrspace(1) null, i32 0, ptr addrspace(1) %tmp57, i32 0, ptr addrspace(1) %tmp57, i32 7, ptr null, i32 0, ptr addrspace(1) %tmp57), "gc-live"() ]
    unreachable
  }

  declare ptr @widget()

  declare void @quux(ptr addrspace(1), ptr addrspace(1))

  declare void @hoge.1()

  declare void @barney(i32, ptr addrspace(1), ptr addrspace(1), i32, i32)

  declare ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token, i32 immarg, i32 immarg) #0

  declare token @llvm.experimental.gc.statepoint.p0(i64 immarg, i32 immarg, ptr, i32 immarg, i32 immarg, ...)

  declare void @ham(i32)

  declare void @wombat()

  attributes #0 = { nounwind readnone }

...
---
name:            hoge
alignment:       16
exposesReturnsTwice: false
legalized:       false
regBankSelected: false
selected:        false
failedISel:      false
tracksRegLiveness: true
hasWinCFI:       false
registers:
  - { id: 0, class: gr64, preferred-register: '' }
  - { id: 1, class: gr64, preferred-register: '' }
  - { id: 2, class: gr64, preferred-register: '' }
  - { id: 3, class: gr64_with_sub_8bit, preferred-register: '' }
  - { id: 4, class: gr32, preferred-register: '' }
  - { id: 5, class: gr32, preferred-register: '' }
  - { id: 6, class: gr64, preferred-register: '' }
  - { id: 7, class: gr64, preferred-register: '' }
  - { id: 8, class: gr64, preferred-register: '' }
  - { id: 9, class: gr32, preferred-register: '' }
  - { id: 10, class: gr64, preferred-register: '' }
  - { id: 11, class: gr64, preferred-register: '' }
  - { id: 12, class: gr64, preferred-register: '' }
  - { id: 13, class: gr64, preferred-register: '' }
  - { id: 14, class: gr64, preferred-register: '' }
  - { id: 15, class: gr64, preferred-register: '' }
  - { id: 16, class: gr64, preferred-register: '' }
  - { id: 17, class: gr64, preferred-register: '' }
  - { id: 18, class: gr32, preferred-register: '' }
  - { id: 19, class: gr8, preferred-register: '' }
  - { id: 20, class: gr32, preferred-register: '' }
  - { id: 21, class: gr64, preferred-register: '' }
  - { id: 22, class: gr32, preferred-register: '' }
  - { id: 23, class: gr32, preferred-register: '' }
  - { id: 24, class: gr64, preferred-register: '' }
  - { id: 25, class: gr32, preferred-register: '' }
  - { id: 26, class: gr8, preferred-register: '' }
  - { id: 27, class: gr32, preferred-register: '' }
  - { id: 28, class: gr8, preferred-register: '' }
  - { id: 29, class: gr32, preferred-register: '' }
  - { id: 30, class: gr32, preferred-register: '' }
  - { id: 31, class: gr8, preferred-register: '' }
  - { id: 32, class: gr64, preferred-register: '' }
  - { id: 33, class: gr32, preferred-register: '' }
  - { id: 34, class: gr64_with_sub_8bit, preferred-register: '' }
  - { id: 35, class: gr32, preferred-register: '' }
  - { id: 36, class: gr64, preferred-register: '' }
  - { id: 37, class: gr32, preferred-register: '' }
  - { id: 38, class: gr64, preferred-register: '' }
  - { id: 39, class: gr64, preferred-register: '' }
  - { id: 40, class: gr64, preferred-register: '' }
  - { id: 41, class: gr64, preferred-register: '' }
  - { id: 42, class: gr64, preferred-register: '' }
  - { id: 43, class: gr64, preferred-register: '' }
  - { id: 44, class: gr32, preferred-register: '' }
  - { id: 45, class: gr8, preferred-register: '' }
  - { id: 46, class: gr32, preferred-register: '' }
  - { id: 47, class: gr64, preferred-register: '' }
  - { id: 48, class: gr64_with_sub_8bit, preferred-register: '' }
  - { id: 49, class: gr32, preferred-register: '' }
  - { id: 50, class: gr32, preferred-register: '' }
  - { id: 51, class: gr8, preferred-register: '' }
  - { id: 52, class: gr32, preferred-register: '' }
  - { id: 53, class: gr8, preferred-register: '' }
  - { id: 54, class: gr64, preferred-register: '' }
  - { id: 55, class: gr32, preferred-register: '' }
  - { id: 56, class: gr32, preferred-register: '' }
  - { id: 57, class: gr64, preferred-register: '' }
  - { id: 58, class: gr64, preferred-register: '' }
  - { id: 59, class: gr32, preferred-register: '' }
  - { id: 60, class: gr64, preferred-register: '' }
  - { id: 61, class: gr64, preferred-register: '' }
  - { id: 62, class: gr64, preferred-register: '' }
  - { id: 63, class: gr32, preferred-register: '' }
  - { id: 64, class: gr64, preferred-register: '' }
  - { id: 65, class: gr32, preferred-register: '' }
  - { id: 66, class: gr64, preferred-register: '' }
  - { id: 67, class: gr32, preferred-register: '' }
  - { id: 68, class: gr64, preferred-register: '' }
  - { id: 69, class: gr32, preferred-register: '' }
  - { id: 70, class: gr64, preferred-register: '' }
  - { id: 71, class: gr64, preferred-register: '' }
  - { id: 72, class: gr64, preferred-register: '' }
  - { id: 73, class: gr32, preferred-register: '' }
  - { id: 74, class: gr64, preferred-register: '' }
  - { id: 75, class: gr64, preferred-register: '' }
  - { id: 76, class: gr64, preferred-register: '' }
  - { id: 77, class: gr32, preferred-register: '' }
  - { id: 78, class: gr64, preferred-register: '' }
  - { id: 79, class: gr32, preferred-register: '' }
liveins:
  - { reg: '$rdi', virtual-reg: '%12' }
frameInfo:
  isFrameAddressTaken: false
  isReturnAddressTaken: false
  hasStackMap:     false
  hasPatchPoint:   false
  stackSize:       0
  offsetAdjustment: 0
  maxAlignment:    4
  adjustsStack:    true
  hasCalls:        true
  stackProtector:  ''
  maxCallFrameSize: 4294967295
  cvBytesOfCalleeSavedRegisters: 0
  hasOpaqueSPAdjustment: false
  hasVAStart:      false
  hasMustTailInVarArgFunc: false
  hasTailCall:     false
  localFrameSize:  0
  savePoint:       ''
  restorePoint:    ''
fixedStack:      []
stack:
  - { id: 0, name: '', type: default, offset: 0, size: 4, alignment: 4,
      stack-id: default, callee-saved-register: '', callee-saved-restored: true,
      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
callSites:       []
debugValueSubstitutions: []
constants:       []
machineFunctionInfo: {}
body:             |
  ; CHECK-LABEL: name: hoge
  ; CHECK: bb.0.bb:
  ; CHECK-NEXT:   successors: %bb.1(0x80000000), %bb.15(0x00000000)
  ; CHECK-NEXT:   liveins: $rdi
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   [[COPY:%[0-9]+]]:gr64 = COPY $rdi
  ; CHECK-NEXT:   ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   $rdi = COPY [[COPY]]
  ; CHECK-NEXT:   dead [[COPY:%[0-9]+]]:gr64 = STATEPOINT 2, 5, 2, undef %15:gr64, $rdi, undef $rsi, 2, 0, 2, 0, 2, 27, 2, 0, 2, 10, 2, 0, 2, 6, 2, 0, 2, 4, 2, 1, 2, 0, [[COPY]], 2, 7, 2, 0, 2, 0, [[COPY]], 2, 7, 2, 0, 2, 0, [[COPY]], 2, 2, 2, 1, 2, 5, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, [[COPY]](tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
  ; CHECK-NEXT:   ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
  ; CHECK-NEXT:   TEST8rr [[MOV32r0_]].sub_8bit, [[MOV32r0_]].sub_8bit, implicit-def $eflags
  ; CHECK-NEXT:   JCC_1 %bb.15, 5, implicit $eflags
  ; CHECK-NEXT:   JMP_1 %bb.1
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.1.bb6:
  ; CHECK-NEXT:   successors: %bb.2(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm undef %17:gr64, 1, $noreg, 0, $noreg :: (load unordered (s64) from `ptr addrspace(1) undef`, addrspace 1)
  ; CHECK-NEXT:   [[MOV64rm:%[0-9]+]]:gr64 = NOT64r [[MOV64rm]]
  ; CHECK-NEXT:   MOV64mr %stack.1, 1, $noreg, 0, $noreg, [[MOV64rm]] :: (store (s64) into %stack.1)
  ; CHECK-NEXT:   undef [[MOV32r0_1:%[0-9]+]].sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags
  ; CHECK-NEXT:   [[DEF:%[0-9]+]]:gr64 = IMPLICIT_DEF
  ; CHECK-NEXT:   [[DEF1:%[0-9]+]]:gr64 = IMPLICIT_DEF
  ; CHECK-NEXT:   [[DEF2:%[0-9]+]]:gr64_with_sub_8bit = IMPLICIT_DEF
  ; CHECK-NEXT:   [[MOV32r0_:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.2.bb7:
  ; CHECK-NEXT:   successors: %bb.3(0x00000000), %bb.4(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   TEST8rr [[MOV32r0_1]].sub_8bit, [[MOV32r0_1]].sub_8bit, implicit-def $eflags
  ; CHECK-NEXT:   JCC_1 %bb.4, 4, implicit $eflags
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.3:
  ; CHECK-NEXT:   successors: %bb.16(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   JMP_1 %bb.16
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.4.bb7:
  ; CHECK-NEXT:   successors: %bb.5(0x00000000), %bb.6(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   TEST8rr [[MOV32r0_1]].sub_8bit, [[MOV32r0_1]].sub_8bit, implicit-def $eflags
  ; CHECK-NEXT:   JCC_1 %bb.6, 4, implicit $eflags
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.5:
  ; CHECK-NEXT:   successors: %bb.16(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   JMP_1 %bb.16
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.6.bb7:
  ; CHECK-NEXT:   successors: %bb.16(0x00000000), %bb.7(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm undef %24:gr64, 1, $noreg, 0, $noreg :: (load unordered (s32) from `ptr addrspace(1) undef`, align 8, addrspace 1)
  ; CHECK-NEXT:   [[MOV32rm:%[0-9]+]]:gr32 = ADD32rr [[MOV32rm]], [[MOV32r0_]], implicit-def dead $eflags
  ; CHECK-NEXT:   CMP32rr [[MOV32r0_]], [[MOV32rm]], implicit-def $eflags
  ; CHECK-NEXT:   JCC_1 %bb.16, 15, implicit $eflags
  ; CHECK-NEXT:   JMP_1 %bb.7
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.7.bb20:
  ; CHECK-NEXT:   successors: %bb.8(0x40000000), %bb.9(0x40000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   TEST8rr [[MOV32r0_1]].sub_8bit, [[MOV32r0_1]].sub_8bit, implicit-def $eflags
  ; CHECK-NEXT:   JCC_1 %bb.9, 4, implicit $eflags
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.8:
  ; CHECK-NEXT:   successors: %bb.11(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   JMP_1 %bb.11
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.9.bb23:
  ; CHECK-NEXT:   successors: %bb.10(0x7ffff800), %bb.12(0x00000800)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   MOV32mr %stack.0, 1, $noreg, 0, $noreg, [[MOV32rm]] :: (store (s32) into %stack.0)
  ; CHECK-NEXT:   EH_LABEL <mcsymbol .Ltmp0>
  ; CHECK-NEXT:   ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   [[MOV64rm1:%[0-9]+]]:gr64 = MOV64rm %stack.1, 1, $noreg, 0, $noreg :: (load (s64) from %stack.1)
  ; CHECK-NEXT:   dead $edx = MOV32r0 implicit-def dead $eflags, implicit-def $rdx
  ; CHECK-NEXT:   $ecx = MOV32r0 implicit-def dead $eflags
  ; CHECK-NEXT:   dead [[MOV64rm1:%[0-9]+]]:gr64, dead [[DEF2:%[0-9]+]]:gr64_with_sub_8bit, dead [[DEF1:%[0-9]+]]:gr64, dead [[DEF:%[0-9]+]]:gr64 = STATEPOINT 1, 16, 5, undef %41:gr64, undef $edi, undef $rsi, $rdx, $ecx, undef $r8d, 2, 0, 2, 0, 2, 89, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 10, 2, 2, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, [[DEF2]], 2, 0, [[DEF2]], 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 2, 2, 8, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 12, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 18, 2, 96, 2, 0, 2, 9, 2, 1, 2, 0, [[DEF1]], 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[DEF]], 2, 3, 1, 4, %stack.0, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[DEF]], 2, 8, 2, 9, 2, 34, 2, 0, 2, 3, 2, 1, 2, 0, [[DEF1]], 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 5, [[MOV64rm1]](tied-def 0), [[DEF2]](tied-def 1), [[DEF1]](tied-def 2), 2, 4278124286, [[DEF]](tied-def 3), 2, 0, 2, 5, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, csr_64, implicit-def $rsp, implicit-def $ssp :: (volatile load store (s32) on %stack.0)
  ; CHECK-NEXT:   ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   EH_LABEL <mcsymbol .Ltmp1>
  ; CHECK-NEXT:   JMP_1 %bb.10
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.10.bb25:
  ; CHECK-NEXT:   successors: %bb.11(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   [[DEF:%[0-9]+]]:gr64 = IMPLICIT_DEF
  ; CHECK-NEXT:   [[DEF1:%[0-9]+]]:gr64 = IMPLICIT_DEF
  ; CHECK-NEXT:   undef [[DEF2:%[0-9]+]].sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.11.bb27:
  ; CHECK-NEXT:   successors: %bb.2(0x80000000), %bb.17(0x00000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   TEST32rr [[MOV32rm]], [[MOV32rm]], implicit-def $eflags
  ; CHECK-NEXT:   [[MOV32r0_:%[0-9]+]]:gr32 = COPY [[MOV32rm]]
  ; CHECK-NEXT:   JCC_1 %bb.2, 8, implicit $eflags
  ; CHECK-NEXT:   JMP_1 %bb.17
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.12.bb35 (landing-pad):
  ; CHECK-NEXT:   successors: %bb.14(0x40000000), %bb.13(0x40000000)
  ; CHECK-NEXT:   liveins: $rax, $rdx
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   EH_LABEL <mcsymbol .Ltmp2>
  ; CHECK-NEXT:   [[MOV32r0_2:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
  ; CHECK-NEXT:   TEST8rr [[MOV32r0_2]].sub_8bit, [[MOV32r0_2]].sub_8bit, implicit-def $eflags
  ; CHECK-NEXT:   JCC_1 %bb.14, 5, implicit $eflags
  ; CHECK-NEXT:   JMP_1 %bb.13
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.13.bb37:
  ; CHECK-NEXT:   successors:
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   $edi = MOV32ri 3
  ; CHECK-NEXT:   STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 87, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 10, 2, 2, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, 2, 8, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 12, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 18, 2, 96, 2, 0, 2, 9, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 3, [[MOV32rm]], 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 0, 2, 9, 2, 51, 2, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, 2, 4278124286, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
  ; CHECK-NEXT:   ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.14.bb39:
  ; CHECK-NEXT:   successors:
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.15.bb40:
  ; CHECK-NEXT:   successors: %bb.16(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   CALL64pcrel32 target-flags(x86-plt) @wombat, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp
  ; CHECK-NEXT:   ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.16.bb41:
  ; CHECK-NEXT:   successors:
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   $edi = MOV32ri -39
  ; CHECK-NEXT:   STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 103, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 10, 2, 2, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, 2, 8, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 12, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 18, 2, 63, 2, 0, 2, 9, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 3, [[MOV32r0_]], 2, 3, 2, 0, 2, 3, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, 2, 33, 2, 6, 2, 0, 2, 5, 2, 0, 2, 0, 2, 4278124286, 2, 3, [[MOV32r0_]], 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 1, 2, 34, 2, 14, 2, 0, 2, 3, 2, 0, 2, 3, [[MOV32r0_]], 2, 3, 2, 4278124286, 2, 3, 2, 0, 2, 1, 2, 4278124286, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
  ; CHECK-NEXT:   ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.17.bb44:
  ; CHECK-NEXT:   successors: %bb.22(0x40000000), %bb.18(0x40000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   CALL64pcrel32 target-flags(x86-plt) @hoge.1, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp
  ; CHECK-NEXT:   ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   [[MOV32r0_3:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
  ; CHECK-NEXT:   TEST8rr [[MOV32r0_3]].sub_8bit, [[MOV32r0_3]].sub_8bit, implicit-def $eflags
  ; CHECK-NEXT:   JCC_1 %bb.22, 5, implicit $eflags
  ; CHECK-NEXT:   JMP_1 %bb.18
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.18.bb45:
  ; CHECK-NEXT:   successors: %bb.19(0x40000000), %bb.20(0x40000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   [[MOV32r0_4:%[0-9]+]]:gr32 = MOV32r0 implicit-def dead $eflags
  ; CHECK-NEXT:   TEST8rr [[MOV32r0_4]].sub_8bit, [[MOV32r0_4]].sub_8bit, implicit-def $eflags
  ; CHECK-NEXT:   JCC_1 %bb.20, 4, implicit $eflags
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.19:
  ; CHECK-NEXT:   successors: %bb.24(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   JMP_1 %bb.24
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.20.bb46:
  ; CHECK-NEXT:   successors: %bb.21(0x40000000), %bb.23(0x40000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   EH_LABEL <mcsymbol .Ltmp3>
  ; CHECK-NEXT:   ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   $ecx = MOV32r0 implicit-def dead $eflags
  ; CHECK-NEXT:   [[DEF2:%[0-9]+]]:gr64_with_sub_8bit = STATEPOINT 1, 16, 5, undef %60:gr64, undef $edi, undef $rsi, undef $rdx, $ecx, undef $r8d, 2, 0, 2, 0, 2, 45, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 10, 2, 2, 2, 19, 2, 0, 2, 3, 2, 1, 2, 0, [[DEF2]], 2, 0, [[DEF2]], 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 8, 2, 9, 2, 34, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, [[DEF2]](tied-def 0), 2, 4278124286, 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
  ; CHECK-NEXT:   ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   EH_LABEL <mcsymbol .Ltmp4>
  ; CHECK-NEXT:   JMP_1 %bb.21
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.21.bb48:
  ; CHECK-NEXT:   successors: %bb.24(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   JMP_1 %bb.24
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.22.bb50:
  ; CHECK-NEXT:   successors:
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   $edi = MOV32ri 10
  ; CHECK-NEXT:   dead [[DEF2:%[0-9]+]]:gr64_with_sub_8bit = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 45, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 10, 2, 2, 2, 19, 2, 0, 2, 3, 2, 1, 2, 0, [[DEF2]], 2, 0, [[DEF2]], 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 1, 2, 9, 2, 6, 2, 1, 2, 3, 2, 0, 2, 0, 2, 0, 2, 0, 2, 4278124286, 2, 0, 2, 0, 2, 7, 2, 0, 2, 3, [[DEF2]](tied-def 0), 2, 0, 2, 4278124286, 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_64, implicit-def $rsp, implicit-def $ssp
  ; CHECK-NEXT:   ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.23.bb52 (landing-pad):
  ; CHECK-NEXT:   successors:
  ; CHECK-NEXT:   liveins: $rax, $rdx
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   EH_LABEL <mcsymbol .Ltmp5>
  ; CHECK-NEXT:   ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   $edi = MOV32ri 3
  ; CHECK-NEXT:   dead [[DEF2:%[0-9]+]]:gr64_with_sub_8bit = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 43, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 10, 2, 2, 2, 19, 2, 0, 2, 3, 2, 1, 2, 0, [[DEF2]], 2, 0, [[DEF2]], 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 0, 2, 9, 2, 51, 2, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, [[DEF2]](tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
  ; CHECK-NEXT:   ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.24.bb56:
  ; CHECK-NEXT:   ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  ; CHECK-NEXT:   $edi = MOV32ri 10
  ; CHECK-NEXT:   dead [[DEF2:%[0-9]+]]:gr64_with_sub_8bit = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 33, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 9, 2, 2, 2, 26, 2, 1, 2, 3, 2, 1, 2, 0, 2, 0, 2, 0, [[DEF2]], 2, 0, [[DEF2]], 2, 7, 2, 0, 2, 0, [[DEF2]], 2, 2, [[DEF2]](tied-def 0), 2, 0, 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
  ; CHECK-NEXT:   ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
  bb.0.bb:
    successors: %bb.1(0x80000000), %bb.12(0x00000000)
    liveins: $rdi

    %14:gr64 = COPY $rdi
    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    $rdi = COPY %14
    dead %14:gr64 = STATEPOINT 2, 5, 2, undef %15:gr64, $rdi, undef $rsi, 2, 0, 2, 0, 2, 27, 2, 0, 2, 10, 2, 0, 2, 6, 2, 0, 2, 4, 2, 1, 2, 0, %14, 2, 7, 2, 0, 2, 0, %14, 2, 7, 2, 0, 2, 0, %14, 2, 2, 2, 1, 2, 5, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, %14(tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    %77:gr32 = MOV32r0 implicit-def dead $eflags
    TEST8rr %77.sub_8bit, %77.sub_8bit, implicit-def $eflags
    JCC_1 %bb.12, 5, implicit $eflags
    JMP_1 %bb.1

  bb.1.bb6:
    successors: %bb.2(0x80000000)

    %0:gr64 = MOV64rm undef %17:gr64, 1, $noreg, 0, $noreg :: (load unordered (s64) from `ptr addrspace(1) undef`, addrspace 1)
    %0:gr64 = NOT64r %0
    undef %48.sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags
    %1:gr64 = IMPLICIT_DEF
    %2:gr64 = IMPLICIT_DEF
    %3:gr64_with_sub_8bit = IMPLICIT_DEF
    %77:gr32 = MOV32r0 implicit-def dead $eflags

  bb.2.bb7:
    successors: %bb.22(0x00000000), %bb.3(0x80000000)

    TEST8rr %48.sub_8bit, %48.sub_8bit, implicit-def $eflags
    JCC_1 %bb.3, 4, implicit $eflags

  bb.22:
    successors: %bb.13(0x80000000)

    JMP_1 %bb.13

  bb.3.bb7:
    successors: %bb.23(0x00000000), %bb.4(0x80000000)

    TEST8rr %48.sub_8bit, %48.sub_8bit, implicit-def $eflags
    JCC_1 %bb.4, 4, implicit $eflags

  bb.23:
    successors: %bb.13(0x80000000)

    JMP_1 %bb.13

  bb.4.bb7:
    successors: %bb.13(0x00000000), %bb.5(0x80000000)

    %5:gr32 = MOV32rm undef %24:gr64, 1, $noreg, 0, $noreg :: (load unordered (s32) from `ptr addrspace(1) undef`, align 8, addrspace 1)
    %5:gr32 = ADD32rr %5, %77, implicit-def dead $eflags
    CMP32rr %77, %5, implicit-def $eflags
    JCC_1 %bb.13, 15, implicit $eflags
    JMP_1 %bb.5

  bb.5.bb20:
    successors: %bb.21(0x40000000), %bb.6(0x40000000)

    TEST8rr %48.sub_8bit, %48.sub_8bit, implicit-def $eflags
    JCC_1 %bb.6, 4, implicit $eflags

  bb.21:
    successors: %bb.8(0x80000000)

    JMP_1 %bb.8

  bb.6.bb23:
    successors: %bb.7(0x7ffff800), %bb.9(0x00000800)

    MOV32mr %stack.0, 1, $noreg, 0, $noreg, %5 :: (store (s32) into %stack.0)
    EH_LABEL <mcsymbol .Ltmp0>
    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    %32:gr64 = COPY %0
    dead $edx = MOV32r0 implicit-def dead $eflags, implicit-def $rdx
    $ecx = MOV32r0 implicit-def dead $eflags
    dead %32:gr64, dead %3:gr64_with_sub_8bit, dead %2:gr64, dead %1:gr64 = STATEPOINT 1, 16, 5, undef %41:gr64, undef $edi, undef $rsi, $rdx, $ecx, undef $r8d, 2, 0, 2, 0, 2, 89, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 10, 2, 2, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, %3, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 2, 2, 8, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 12, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 18, 2, 96, 2, 0, 2, 9, 2, 1, 2, 0, %2, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %1, 2, 3, 1, 4, %stack.0, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %1, 2, 8, 2, 9, 2, 34, 2, 0, 2, 3, 2, 1, 2, 0, %2, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 5, %32(tied-def 0), %3(tied-def 1), %2(tied-def 2), 2, 4278124286, %1(tied-def 3), 2, 0, 2, 5, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, csr_64, implicit-def $rsp, implicit-def $ssp :: (volatile load store (s32) on %stack.0)
    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    EH_LABEL <mcsymbol .Ltmp1>
    JMP_1 %bb.7

  bb.7.bb25:
    successors: %bb.8(0x80000000)

    %1:gr64 = IMPLICIT_DEF
    %2:gr64 = IMPLICIT_DEF
    undef %3.sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags

  bb.8.bb27:
    successors: %bb.2(0x80000000), %bb.14(0x00000000)

    TEST32rr %5, %5, implicit-def $eflags
    %77:gr32 = COPY %5
    JCC_1 %bb.2, 8, implicit $eflags
    JMP_1 %bb.14

  bb.9.bb35 (landing-pad):
    successors: %bb.11(0x40000000), %bb.10(0x40000000)
    liveins: $rax, $rdx

    EH_LABEL <mcsymbol .Ltmp2>
    %44:gr32 = MOV32r0 implicit-def dead $eflags
    TEST8rr %44.sub_8bit, %44.sub_8bit, implicit-def $eflags
    JCC_1 %bb.11, 5, implicit $eflags
    JMP_1 %bb.10

  bb.10.bb37:
    successors:

    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    $edi = MOV32ri 3
    STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 87, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 10, 2, 2, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, 2, 8, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 12, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 18, 2, 96, 2, 0, 2, 9, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 3, %5, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 0, 2, 9, 2, 51, 2, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, 2, 4278124286, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp

  bb.11.bb39:
    successors:


  bb.12.bb40:
    successors: %bb.13(0x80000000)

    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    CALL64pcrel32 target-flags(x86-plt) @wombat, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp
    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp

  bb.13.bb41:
    successors:

    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    $edi = MOV32ri -39
    STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 103, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 10, 2, 2, 2, 12, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, 2, 8, 2, 4, 2, 0, 2, 1, 2, 0, 2, 7, 2, 0, 2, 2, 2, 12, 2, 7, 2, 0, 2, 2, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 10, 2, 18, 2, 63, 2, 0, 2, 9, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 3, %77, 2, 3, 2, 0, 2, 3, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, 2, 33, 2, 6, 2, 0, 2, 5, 2, 0, 2, 0, 2, 4278124286, 2, 3, %77, 2, 3, 2, 4278124286, 2, 0, 2, 4278124286, 2, 3, 2, 4278124286, 2, 1, 2, 34, 2, 14, 2, 0, 2, 3, 2, 0, 2, 3, %77, 2, 3, 2, 4278124286, 2, 3, 2, 0, 2, 1, 2, 4278124286, 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp

  bb.14.bb44:
    successors: %bb.18(0x40000000), %bb.15(0x40000000)

    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    CALL64pcrel32 target-flags(x86-plt) @hoge.1, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp
    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    %50:gr32 = MOV32r0 implicit-def dead $eflags
    TEST8rr %50.sub_8bit, %50.sub_8bit, implicit-def $eflags
    JCC_1 %bb.18, 5, implicit $eflags
    JMP_1 %bb.15

  bb.15.bb45:
    successors: %bb.24(0x40000000), %bb.16(0x40000000)

    %52:gr32 = MOV32r0 implicit-def dead $eflags
    TEST8rr %52.sub_8bit, %52.sub_8bit, implicit-def $eflags
    JCC_1 %bb.16, 4, implicit $eflags

  bb.24:
    successors: %bb.20(0x80000000)

    JMP_1 %bb.20

  bb.16.bb46:
    successors: %bb.17(0x40000000), %bb.19(0x40000000)

    EH_LABEL <mcsymbol .Ltmp3>
    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    $ecx = MOV32r0 implicit-def dead $eflags
    %3:gr64_with_sub_8bit = STATEPOINT 1, 16, 5, undef %60:gr64, undef $edi, undef $rsi, undef $rdx, $ecx, undef $r8d, 2, 0, 2, 0, 2, 45, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 10, 2, 2, 2, 19, 2, 0, 2, 3, 2, 1, 2, 0, %3, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 8, 2, 9, 2, 34, 2, 0, 2, 3, 2, 1, 2, 0, 2, 4278124286, 2, 0, 2, 4278124286, 2, 7, 2, 0, 2, 0, 2, 4278124286, 2, 2, %3(tied-def 0), 2, 4278124286, 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    EH_LABEL <mcsymbol .Ltmp4>
    JMP_1 %bb.17

  bb.17.bb48:
    successors: %bb.20(0x80000000)

    JMP_1 %bb.20

  bb.18.bb50:
    successors:

    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    $edi = MOV32ri 10
    dead %3:gr64_with_sub_8bit = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 45, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 10, 2, 2, 2, 19, 2, 0, 2, 3, 2, 1, 2, 0, %3, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 1, 2, 9, 2, 6, 2, 1, 2, 3, 2, 0, 2, 0, 2, 0, 2, 0, 2, 4278124286, 2, 0, 2, 0, 2, 7, 2, 0, 2, 3, %3(tied-def 0), 2, 0, 2, 4278124286, 2, 0, 2, 3, 0, 0, 1, 1, 2, 2, csr_64, implicit-def $rsp, implicit-def $ssp
    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp

  bb.19.bb52 (landing-pad):
    successors:
    liveins: $rax, $rdx

    EH_LABEL <mcsymbol .Ltmp5>
    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    $edi = MOV32ri 3
    dead %3:gr64_with_sub_8bit = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 43, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 10, 2, 2, 2, 19, 2, 0, 2, 3, 2, 1, 2, 0, %3, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 0, 2, 9, 2, 51, 2, 0, 2, 3, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 7, 2, 0, 2, 1, %3(tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp

  bb.20.bb56:
    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
    $edi = MOV32ri 10
    dead %3:gr64_with_sub_8bit = STATEPOINT 2882400000, 0, 1, target-flags(x86-plt) @ham, $edi, 2, 0, 2, 2, 2, 33, 2, 0, 2, 10, 2, 0, 2, 10, 2, 0, 2, 4, 2, 1, 2, 7, 2, 0, 2, 7, 2, 0, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 9, 2, 2, 2, 26, 2, 1, 2, 3, 2, 1, 2, 0, 2, 0, 2, 0, %3, 2, 0, %3, 2, 7, 2, 0, 2, 0, %3, 2, 2, %3(tied-def 0), 2, 0, 2, 0, 2, 2, 0, 0, 1, 1, csr_64, implicit-def $rsp, implicit-def $ssp
    ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp

...