[TableGen] Fix a bug that caused the wrong name for a record built from a multiclass...
[oota-llvm.git] / test / Other / optimization-remarks-inline.ll
index 4870c17ae2fe285c5dd1b55b55c7ab1fc665499b..bcd90bc28d328e10b9399b9c008fa1798a933829 100644 (file)
@@ -1,7 +1,14 @@
 ; RUN: opt < %s -inline -pass-remarks='inline' -S 2>&1 | FileCheck %s
 ; RUN: opt < %s -inline -pass-remarks='inl.*' -S 2>&1 | FileCheck %s
 ; RUN: opt < %s -inline -pass-remarks='vector' -pass-remarks='inl' -S 2>&1 | FileCheck %s
+
+; These two should not yield an inline remark for the same reason.
+; In the first command, we only ask for vectorizer remarks, in the
+; second one we ask for the inliner, but we then ask for the vectorizer
+; (thus overriding the first flag).
 ; RUN: opt < %s -inline -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
+; RUN: opt < %s -inline -pass-remarks='inl' -pass-remarks='vector' -S 2>&1 | FileCheck --check-prefix=REMARKS %s
+
 ; RUN: opt < %s -inline -S 2>&1 | FileCheck --check-prefix=REMARKS %s
 ; RUN: not opt < %s -pass-remarks='(' 2>&1 | FileCheck --check-prefix=BAD-REGEXP %s
 
@@ -11,8 +18,8 @@ entry:
   %y.addr = alloca i32, align 4
   store i32 %x, i32* %x.addr, align 4
   store i32 %y, i32* %y.addr, align 4
-  %0 = load i32* %x.addr, align 4
-  %1 = load i32* %y.addr, align 4
+  %0 = load i32, i32* %x.addr, align 4
+  %1 = load i32, i32* %y.addr, align 4
   %add = add nsw i32 %0, %1
   ret i32 %add
 }
@@ -21,8 +28,8 @@ define i32 @bar(i32 %j) #0 {
 entry:
   %j.addr = alloca i32, align 4
   store i32 %j, i32* %j.addr, align 4
-  %0 = load i32* %j.addr, align 4
-  %1 = load i32* %j.addr, align 4
+  %0 = load i32, i32* %j.addr, align 4
+  %1 = load i32, i32* %j.addr, align 4
   %sub = sub nsw i32 %1, 2
   %call = call i32 @foo(i32 %0, i32 %sub)
 ; CHECK: foo inlined into bar