llvm/llvm/test/Transforms/GVN/scalable-memloc.ll

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

define void @test(i1 %cmp19, ptr %p) {
; CHECK-LABEL: @test(
; CHECK-NEXT:  entry:
; CHECK-NEXT:    br i1 [[CMP19:%.*]], label [[WHILE_BODY_LR_PH:%.*]], label [[FOR_COND_PREHEADER:%.*]]
; CHECK:       while.body.lr.ph:
; CHECK-NEXT:    [[DOTPRE1:%.*]] = load <vscale x 2 x double>, ptr [[P:%.*]], align 16
; CHECK-NEXT:    [[TMP0:%.*]] = extractelement <vscale x 2 x double> [[DOTPRE1]], i64 0
; CHECK-NEXT:    ret void
; CHECK:       for.cond.preheader:
; CHECK-NEXT:    [[DOTPRE:%.*]] = load double, ptr [[P]], align 8
; CHECK-NEXT:    [[ADD:%.*]] = fadd double [[DOTPRE]], 0.000000e+00
; CHECK-NEXT:    ret void
;
entry:
  br i1 %cmp19, label %while.body.lr.ph, label %for.cond.preheader

while.body.lr.ph:                                 ; preds = %entry
  %.pre1 = load <vscale x 2 x double>, ptr %p, align 16
  %0 = extractelement <vscale x 2 x double> %.pre1, i64 0
  ret void

for.cond.preheader:                               ; preds = %entry
  %.pre = load double, ptr %p, align 8
  %add = fadd double %.pre, 0.000000e+00
  ret void
}