| # RUN: llc -mtriple=riscv32 %s -run-pass=machine-sink -o - | FileCheck %s |
| # RUN: llc -mtriple=riscv32 %s -passes=machine-sink -o - | FileCheck %s |
| # Verify that sinking of '%20:gpr = LUI 1, implicit $x0' is not inhibited by |
| # the implicit use of '$x0'. |
| # Register '$x0' is a 'MRI->isConstantPhysReg()' on RISCV and such uses should |
| # not inhibit sinking transformation even though they are livein to the block |
| # they are to be sunk into (inhibit under such conditions should only happen |
| ; CHECK-NEXT: successors: %bb.3(0x80000000) |
| ; CHECK-NEXT: liveins: $x0 |
| ; CHECK-NEXT: [[LUI:%[0-9]+]]:gpr = LUI 1, implicit $x0 |
| %20:gpr = LUI 1, implicit $x0 |