|
1 | | -; RUN: llc -mtriple riscv64 -mattr=+d -riscv-enable-live-variables --stop-after=riscv-live-variables -riscv-liveness-update-kills < %s | FileCheck %s |
| 1 | +; RUN: llc -mtriple riscv64 -mattr=+d -riscv-enable-live-variables \ |
| 2 | +; RUN: --stop-after=riscv-live-variables -riscv-liveness-update-kills < %s | FileCheck %s |
| 3 | + |
| 4 | +; RUN: llc -mtriple riscv64 -mattr=+d -riscv-enable-live-variables \ |
| 5 | +; RUN: -riscv-liveness-update-kills < %s | FileCheck --check-prefix: CHECK-LICM %s |
2 | 6 |
|
3 | 7 | ; Issue: #166141 Pessimistic MachineLICM due to missing liveness info. |
4 | 8 |
|
5 | | -; CHECK: %42:fpr64 = nofpexcept FMUL_D killed %2, killed %41, 7, implicit $frm |
| 9 | +; Check that live variable analysis correctly marks %41 as kill |
| 10 | +; CHECK: bb.2.if: |
| 11 | +; CHECK: successors: %bb.3(0x80000000) |
| 12 | +; |
| 13 | +; CHECK: %40:gpr = LUI target-flags(riscv-hi) %const.0 |
| 14 | +; CHECK: %41:fpr64 = FLD killed %40, target-flags(riscv-lo) %const.0 :: (load (s64) from constant-pool) |
| 15 | +; CHECK: %42:fpr64 = nofpexcept FMUL_D killed %2, killed %41, 7, implicit $frm |
| 16 | +; CHECK: FSD killed %42, %1, 0 :: (store (s64) into %ir.lsr.iv1) |
| 17 | + |
| 18 | +; Check that the loop invariant `fld` is hoisted out of the loop. |
| 19 | +; CHECK-LICM: # %bb.0: |
| 20 | +; CHECK-LICM: lui a1, %hi(.LCPI0_0) |
| 21 | +; CHECK-LICM: fld fa5, %lo(.LCPI0_0)(a1) |
| 22 | +; CHECK-LICM: lui a1, 2 |
| 23 | +; CHECK-LICM: add a1, a0, a1 |
| 24 | +; CHECK-LICM: fmv.d.x fa4, zero |
| 25 | +; CHECK-LICM: j .LBB0_2 |
| 26 | +; CHECK-LICM: .LBB0_1: |
6 | 27 |
|
7 | 28 | define void @f(ptr %p) { |
8 | 29 | entry: |
|
0 commit comments