r368828 - [NFC] Make test more robust

David Bolvansky via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 14 04:13:10 PDT 2019


Author: xbolva00
Date: Wed Aug 14 04:13:10 2019
New Revision: 368828

URL: http://llvm.org/viewvc/llvm-project?rev=368828&view=rev
Log:
[NFC] Make test more robust

Currently fails on ARMs

Modified:
    cfe/trunk/test/CodeGen/struct-copy.c

Modified: cfe/trunk/test/CodeGen/struct-copy.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/struct-copy.c?rev=368828&r1=368827&r2=368828&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/struct-copy.c (original)
+++ cfe/trunk/test/CodeGen/struct-copy.c Wed Aug 14 04:13:10 2019
@@ -1,39 +1,17 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
 // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
 struct x { int a[100]; };
 
-// CHECK-LABEL: @foo(
-// CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[P_ADDR:%.*]] = alloca %struct.x*, align 8
-// CHECK-NEXT:    [[Q_ADDR:%.*]] = alloca %struct.x*, align 8
-// CHECK-NEXT:    store %struct.x* [[P:%.*]], %struct.x** [[P_ADDR]], align 8
-// CHECK-NEXT:    store %struct.x* [[Q:%.*]], %struct.x** [[Q_ADDR]], align 8
-// CHECK-NEXT:    [[TMP0:%.*]] = load %struct.x*, %struct.x** [[P_ADDR]], align 8
-// CHECK-NEXT:    [[TMP1:%.*]] = load %struct.x*, %struct.x** [[Q_ADDR]], align 8
-// CHECK-NEXT:    [[TMP2:%.*]] = bitcast %struct.x* [[TMP0]] to i8*
-// CHECK-NEXT:    [[TMP3:%.*]] = bitcast %struct.x* [[TMP1]] to i8*
-// CHECK-NEXT:    call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP2]], i8* align 4 [[TMP3]], i64 400, i1 false)
-// CHECK-NEXT:    ret void
-//
+
 void foo(struct x *P, struct x *Q) {
+// CHECK-LABEL: @foo(
+// CHECK:    call void @llvm.memcpy.p0i8.p0i8.i64
   *P = *Q;
 }
 
 // CHECK: declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg)
 
-// CHECK-LABEL: @bar(
-// CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[P_ADDR:%.*]] = alloca %struct.x*, align 8
-// CHECK-NEXT:    [[Q_ADDR:%.*]] = alloca %struct.x*, align 8
-// CHECK-NEXT:    store %struct.x* [[P:%.*]], %struct.x** [[P_ADDR]], align 8
-// CHECK-NEXT:    store %struct.x* [[Q:%.*]], %struct.x** [[Q_ADDR]], align 8
-// CHECK-NEXT:    [[TMP0:%.*]] = load %struct.x*, %struct.x** [[P_ADDR]], align 8
-// CHECK-NEXT:    [[TMP1:%.*]] = bitcast %struct.x* [[TMP0]] to i8*
-// CHECK-NEXT:    [[TMP2:%.*]] = load %struct.x*, %struct.x** [[Q_ADDR]], align 8
-// CHECK-NEXT:    [[TMP3:%.*]] = bitcast %struct.x* [[TMP2]] to i8*
-// CHECK-NEXT:    call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[TMP1]], i8* align 4 [[TMP3]], i64 400, i1 false)
-// CHECK-NEXT:    ret void
-//
 void bar(struct x *P, struct x *Q) {
+// CHECK-LABEL: @bar(
+// CHECK:    call void @llvm.memcpy.p0i8.p0i8.i64
   __builtin_memcpy(P, Q, sizeof(struct x));
 }




More information about the cfe-commits mailing list