fix unit test for latest LLVM (i8 alignment)
MODIFY
tests/alive-tv/attrs/nonnull-bugfix.srctgt.ll
tests/alive-tv/attrs/nonnull-bugfix.srctgt.ll
-target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-; Function Attrs: nounwind uwtable
-define void @src(i8* %db, i8* %p) {
+define void @src(ptr %db, ptr %p) {
entry:
- %0 = ptrtoint i8* %p to i8
- %1 = getelementptr i8, i8* %db, i32 0
- %2 = load i8, i8* %1, align 8 ; It was loaded, so %db cannot be null
- %call6 = call i8* @g(i8* %db)
+ %0 = ptrtoint ptr %p to i8
+ %1 = getelementptr i8, ptr %db, i32 0
+ %2 = load i8, ptr %1, align 8 ; It was loaded, so %db cannot be null
+ %call6 = call ptr @g(ptr %db)
ret void
}
-define void @tgt(i8* %db, i8* %p) {
+define void @tgt(ptr %db, ptr %p) {
entry:
- %0 = ptrtoint i8* %p to i8
- %1 = getelementptr i8, i8* %db, i32 0
- %2 = load i8, i8* %1, align 8
- %call6 = call i8* @g(i8* nonnull %db)
+ %0 = ptrtoint ptr %p to i8
+ %1 = getelementptr i8, ptr %db, i32 0
+ %2 = load i8, ptr %1, align 8
+ %call6 = call ptr @g(ptr nonnull %db)
ret void
}
-declare i8* @g(i8*)
+declare ptr @g(ptr)

fix unit test for latest LLVM (i8 alignment)