reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -gvn-sink -S < %s | FileCheck %s

; This would assert/crash because the calls have different numbers of operands:
; https://bugs.llvm.org/show_bug.cgi?id=42346

%vec = type opaque
%map = type { i32 }

define void @PR42346() {
; CHECK-LABEL: @PR42346(
; CHECK-NEXT:  entry:
; CHECK-NEXT:    [[CALL1:%.*]] = call %vec* @bar(%map* undef, %vec* (%map*)* undef)
; CHECK-NEXT:    br label [[EXIT:%.*]]
; CHECK:       if:
; CHECK-NEXT:    [[CALL2:%.*]] = call %vec* @baz(%map* undef)
; CHECK-NEXT:    br label [[EXIT]]
; CHECK:       exit:
; CHECK-NEXT:    ret void
;
entry:
  %call1 = call %vec* @bar(%map* undef, %vec* (%map*)* undef)
  br label %exit

if:
  %call2 = call %vec* @baz(%map* undef)
  br label %exit

exit:
  ret void
}

declare %vec* @bar(%map*, %vec* (%map*)*)
declare %vec* @baz(%map*)