[PATCH] Fix a mergefunc crash caused by bitcasting intrinsics

Stepan Dyatkovskiy stpworld at narod.ru
Tue Apr 22 23:12:26 PDT 2014


================
Comment at: test/Transforms/MergeFunc/intrinsics.ll:1
@@ +1,2 @@
+; RUN: opt -mergefunc -disable-output < %s
+; This used to crash because mergefunc created a bitcast of an intrinsic.
----------------
I'd propose to check "-stats" output here as well.

================
Comment at: test/Transforms/MergeFunc/intrinsics.ll:11
@@ +10,3 @@
+; Function Attrs: inlinehint uwtable
+define void @bswap_caller(i64) unnamed_addr {
+entry-block:
----------------
Instead of -disable-output, I'd propose to direct it to FileCheck and ensure both of @collider and @bswap_caller appear in output in their original state.
As example you could use:
1. test/Transforms/MergeFunc/too-small.ll
2. test/Transforms/MergeFunc/ptr-int-transitivity-1.ll

Though, instead of 'not grep "functions merged"'
you could just use CHECK-NOT in the end of test.

http://reviews.llvm.org/D3437

REPLY HANDLER ACTIONS
  Reply to comment, or !reject, !abandon, !reclaim, !resign, !rethink, !unsubscribe.






More information about the llvm-commits mailing list