aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/RISCV/optnone-store-no-combine.ll
blob: f2b1a2aab3a1715a661e5885326163e3a922eb49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s | FileCheck %s

; This test verifies that a repeated store is not eliminated with optnone (improves debugging).

define void @foo(ptr %p) noinline optnone {
; CHECK-LABEL: foo:
; CHECK:       # %bb.0:
; CHECK-NEXT:    li a1, 8
; CHECK-NEXT:    sw a1, 0(a0)
; CHECK-NEXT:    sw a1, 0(a0)
; CHECK-NEXT:    ret
  store i32 8, ptr %p, align 4
  store i32 8, ptr %p, align 4
  ret void
}