From d0d2ce942507daf7d3315ef5e070e89f2823f1ef Mon Sep 17 00:00:00 2001 From: Brian Gesiak Date: Thu, 12 Apr 2018 21:28:04 +0000 Subject: Let llvm-diff correctly deal with Undef/ConstantAggregateZero/ConstantVector/IndirectBr Summary: llvm-diff incorrectly reports that there's a diff when input IR contains undef/zeroinitializer/constantvector/indirectbr. (This happens even if two identical files are given, e.g. `llvm-diff x.ll x.ll`) This is fix to the bug report https://bugs.llvm.org/show_bug.cgi?id=33623 . Reviewers: dexonsmith, rjmccall Reviewed By: rjmccall Subscribers: chenwj, mgrang, llvm-commits Differential Revision: https://reviews.llvm.org/D34856 llvm-svn: 329957 --- llvm/test/tools/llvm-diff/constantvector.ll | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 llvm/test/tools/llvm-diff/constantvector.ll (limited to 'llvm/test/tools/llvm-diff/constantvector.ll') diff --git a/llvm/test/tools/llvm-diff/constantvector.ll b/llvm/test/tools/llvm-diff/constantvector.ll new file mode 100644 index 00000000000..96bb304eccf --- /dev/null +++ b/llvm/test/tools/llvm-diff/constantvector.ll @@ -0,0 +1,16 @@ +; Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=33623 +; RUN: llvm-diff %s %s + +%struct.it = type { i64, i64* } + +@a_vector = internal global [2 x i64] zeroinitializer, align 16 + +define i32 @foo(%struct.it* %it) { + +entry: + %a = getelementptr inbounds %struct.it, %struct.it* %it, i64 0, i32 1 + %tmp0 = bitcast i64** %a to <2 x i64*>* + store <2 x i64*> , <2 x i64*>* %tmp0, align 8 + + ret i32 0 +} -- cgit v1.2.3