[llvm] r354398 - [Test] Autogenerate existing tests before adding more
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 19 14:57:30 PST 2019
Author: reames
Date: Tue Feb 19 14:57:30 2019
New Revision: 354398
URL: http://llvm.org/viewvc/llvm-project?rev=354398&view=rev
Log:
[Test] Autogenerate existing tests before adding more
Modified:
llvm/trunk/test/Transforms/GVN/non-integral-pointers.ll
Modified: llvm/trunk/test/Transforms/GVN/non-integral-pointers.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/non-integral-pointers.ll?rev=354398&r1=354397&r2=354398&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GVN/non-integral-pointers.ll (original)
+++ llvm/trunk/test/Transforms/GVN/non-integral-pointers.ll Tue Feb 19 14:57:30 2019
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -gvn -S < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:4"
@@ -5,35 +6,52 @@ target triple = "x86_64-unknown-linux-gn
define void @f0(i1 %alwaysFalse, i64 %val, i64* %loc) {
; CHECK-LABEL: @f0(
-; CHECK-NOT: inttoptr
-; CHECK-NOT: ptrtoint
- entry:
+; CHECK-NEXT: entry:
+; CHECK-NEXT: store i64 [[VAL:%.*]], i64* [[LOC:%.*]]
+; CHECK-NEXT: br i1 [[ALWAYSFALSE:%.*]], label [[NEVERTAKEN:%.*]], label [[ALWAYSTAKEN:%.*]]
+; CHECK: neverTaken:
+; CHECK-NEXT: [[LOC_BC:%.*]] = bitcast i64* [[LOC]] to i8 addrspace(4)**
+; CHECK-NEXT: [[PTR:%.*]] = load i8 addrspace(4)*, i8 addrspace(4)** [[LOC_BC]]
+; CHECK-NEXT: store i8 5, i8 addrspace(4)* [[PTR]]
+; CHECK-NEXT: ret void
+; CHECK: alwaysTaken:
+; CHECK-NEXT: ret void
+;
+ entry:
store i64 %val, i64* %loc
br i1 %alwaysFalse, label %neverTaken, label %alwaysTaken
- neverTaken:
+ neverTaken:
%loc.bc = bitcast i64* %loc to i8 addrspace(4)**
%ptr = load i8 addrspace(4)*, i8 addrspace(4)** %loc.bc
store i8 5, i8 addrspace(4)* %ptr
ret void
- alwaysTaken:
+ alwaysTaken:
ret void
}
define i64 @f1(i1 %alwaysFalse, i8 addrspace(4)* %val, i8 addrspace(4)** %loc) {
; CHECK-LABEL: @f1(
-; CHECK-NOT: inttoptr
-; CHECK-NOT: ptrtoint
- entry:
+; CHECK-NEXT: entry:
+; CHECK-NEXT: store i8 addrspace(4)* [[VAL:%.*]], i8 addrspace(4)** [[LOC:%.*]]
+; CHECK-NEXT: br i1 [[ALWAYSFALSE:%.*]], label [[NEVERTAKEN:%.*]], label [[ALWAYSTAKEN:%.*]]
+; CHECK: neverTaken:
+; CHECK-NEXT: [[LOC_BC:%.*]] = bitcast i8 addrspace(4)** [[LOC]] to i64*
+; CHECK-NEXT: [[INT:%.*]] = load i64, i64* [[LOC_BC]]
+; CHECK-NEXT: ret i64 [[INT]]
+; CHECK: alwaysTaken:
+; CHECK-NEXT: ret i64 42
+;
+ entry:
store i8 addrspace(4)* %val, i8 addrspace(4)** %loc
br i1 %alwaysFalse, label %neverTaken, label %alwaysTaken
- neverTaken:
+ neverTaken:
%loc.bc = bitcast i8 addrspace(4)** %loc to i64*
%int = load i64, i64* %loc.bc
ret i64 %int
- alwaysTaken:
+ alwaysTaken:
ret i64 42
}
More information about the llvm-commits
mailing list