summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-diff/indirectbr.ll
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2018-04-12 21:28:04 +0000
committerBrian Gesiak <modocache@gmail.com>2018-04-12 21:28:04 +0000
commitd0d2ce942507daf7d3315ef5e070e89f2823f1ef (patch)
treed56052f4e7c668bfab617dbed06d0f127fb3de59 /llvm/test/tools/llvm-diff/indirectbr.ll
parent00db326b0d5fdd10998fe070fdaf80d3cc731585 (diff)
downloadbcm5719-llvm-d0d2ce942507daf7d3315ef5e070e89f2823f1ef.tar.gz
bcm5719-llvm-d0d2ce942507daf7d3315ef5e070e89f2823f1ef.zip
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
Diffstat (limited to 'llvm/test/tools/llvm-diff/indirectbr.ll')
-rw-r--r--llvm/test/tools/llvm-diff/indirectbr.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-diff/indirectbr.ll b/llvm/test/tools/llvm-diff/indirectbr.ll
new file mode 100644
index 00000000000..cff43fc7eb1
--- /dev/null
+++ b/llvm/test/tools/llvm-diff/indirectbr.ll
@@ -0,0 +1,11 @@
+; Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=33623
+; RUN: llvm-diff %s %s
+
+define i32 @foo(i8*) {
+entry:
+ indirectbr i8* %0, [label %A, label %B, label %entry]
+A:
+ ret i32 1
+B:
+ ret i32 2
+}
OpenPOWER on IntegriCloud