llvm/llvm/test/Transforms/GVN/storeinvgroup.ll

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -passes=gvn -S -o - < %s | FileCheck %s

define double @code(ptr %a1) {
; CHECK-LABEL: @code(
; CHECK-NEXT:  entry:
; CHECK-NEXT:    [[META:%.*]] = alloca ptr, align 8
; CHECK-NEXT:    store double 1.234500e+00, ptr [[A1:%.*]], align 8
; CHECK-NEXT:    store ptr [[A1]], ptr [[META]], align 8, !invariant.group !0
; CHECK-NEXT:    ret double 1.234500e+00
;
entry:
  %meta = alloca ptr
  store double 1.23450000e+00, ptr %a1, align 8
  store ptr %a1, ptr %meta, align 8, !invariant.group !0
  %iload = load double, ptr %a1, align 8, !invariant.group !1
  ret double %iload
}

!0 = distinct !{}
!1 = distinct !{}