1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=gvn-sink -S < %s | FileCheck %s
4 ; This would assert/crash because the calls have different numbers of operands:
5 ; https://bugs.llvm.org/show_bug.cgi?id=42346
10 define void @PR42346() {
11 ; CHECK-LABEL: @PR42346(
13 ; CHECK-NEXT: [[CALL1:%.*]] = call ptr @bar(ptr undef, ptr undef)
14 ; CHECK-NEXT: br label [[EXIT:%.*]]
16 ; CHECK-NEXT: [[CALL2:%.*]] = call ptr @baz(ptr undef)
17 ; CHECK-NEXT: br label [[EXIT]]
19 ; CHECK-NEXT: ret void
22 %call1 = call ptr @bar(ptr undef, ptr undef)
26 %call2 = call ptr @baz(ptr undef)
33 declare ptr @bar(ptr, ptr)