brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 0c172dc Raw
39 lines · plain
1; RUN: opt -S -passes=gvn -enable-load-pre < %s | FileCheck %s2 3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"4 5%ArrayImpl = type { i64, ptr addrspace(100), [1 x i64], [1 x i64], [1 x i64], i64, i64, ptr addrspace(100), ptr addrspace(100), i8, i64 }6 7; Function Attrs: readnone8declare ptr @getaddr_ArrayImpl(ptr addrspace(100)) #09 10; Function Attrs: readnone11declare ptr @getaddr_i64(ptr addrspace(100)) #012 13; Make sure that the test compiles without a crash.14; Bug https://bugs.llvm.org/show_bug.cgi?id=3493715 16define hidden void @wrapon_fn173() {17 18; CHECK-LABEL: @wrapon_fn17319; CHECK:       entry:20; CHECK-NEXT:    call ptr @getaddr_ArrayImpl(ptr addrspace(100) undef)21; CHECK-NEXT:    %.pre = load ptr addrspace(100), ptr null, align 822; CHECK-NEXT:    br label %loop23; CHECK:       loop:24; CHECK-NEXT:    call ptr @getaddr_i64(ptr addrspace(100) %.pre)25; CHECK-NEXT:    br label %loop26 27entry:28  %0 = call ptr @getaddr_ArrayImpl(ptr addrspace(100) undef)29  br label %loop30 31loop:32  %1 = call ptr @getaddr_ArrayImpl(ptr addrspace(100) undef)33  %2 = load ptr addrspace(100), ptr null, align 834  %3 = call ptr @getaddr_i64(ptr addrspace(100) %2)35  br label %loop36}37 38attributes #0 = { readnone }39