; RUN: if [ %llvmver -lt 16 ]; then opt < %s %loadEnzyme -print-type-analysis -type-analysis-func=caller -o /dev/null | FileCheck %s; fi
; RUN: opt < %s %newLoadEnzyme -passes="print-type-analysis" -type-analysis-func=caller -S -o /dev/null | FileCheck %s

declare void @f(i64 %x)

define void @caller(i64* %p) {
entry:
  %z = bitcast i64* %p to double*
  %int = ptrtoint double* %z to i64
  %cmp = icmp eq i64 %int, %int
  ret void
}

!llvm.module.flags = !{!0}
!llvm.ident = !{!1}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 7.1.0 "}
!2 = !{!3, !3, i64 0, i64 8}
!3 = !{!4, i64 8, !"double"}
!4 = !{!5, i64 1, !"omnipotent char"}
!5 = !{!"Simple C++ TBAA"}


; CHECK: caller - {} |{[-1]:Pointer}:{} 
; CHECK-NEXT: i64* %p: {[-1]:Pointer}
; CHECK-NEXT: entry
; CHECK-NEXT:   %z = bitcast i64* %p to double*: {[-1]:Pointer}
; CHECK-NEXT:   %int = ptrtoint double* %z to i64: {[-1]:Pointer}
; CHECK-NEXT:   %cmp = icmp eq i64 %int, %int: {[-1]:Integer}
; CHECK-NEXT:   ret void: {}
