Home | History | Annotate | Download | only in WebAssembly
      1 # RUN: llc -mtriple=wasm32-unknown-unknown -run-pass wasm-explicit-locals %s -o - | FileCheck %s
      2 
      3 # When a drop instruction is inserted to drop a dead register operand, the
      4 # original operand should be marked not dead anymore because it is now used by
      5 # the new drop instruction. And the operand to the new drop instruction should
      6 # be marked killed instead.
      7 ---
      8 name: drop_test
      9 liveins:
     10   - { reg: '$arguments' }
     11 tracksRegLiveness: true
     12 body: |
     13   bb.0:
     14     successors: %bb.1
     15     liveins: $arguments
     16 
     17   bb.1:
     18   ; predecessors: %bb.0
     19     ; CHECK-NOT: dead %{{[0-9]+}}
     20     ; CHECK: DROP_I32 killed %{{[0-9]+}}
     21     dead %0:i32 = CONST_I32 0, implicit-def dead $arguments, implicit $sp32, implicit $sp64
     22     RETURN_VOID implicit-def dead $arguments
     23 ...
     24