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
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -ipconstprop -S -o - | FileCheck %s

; This test is just to verify that we do not crash/assert due to mismatch in
; argument type between the caller and callee.

define dso_local void @foo(i16 %a) {
; CHECK-LABEL: @foo(
; CHECK-NEXT:    [[CALL:%.*]] = call i16 bitcast (i16 (i16, i16)* @bar to i16 (i16, i32)*)(i16 [[A:%.*]], i32 7)
; CHECK-NEXT:    ret void
;
  %call = call i16 bitcast (i16 (i16, i16) * @bar to i16 (i16, i32) *)(i16 %a, i32 7)
  ret void
}

define internal i16 @bar(i16 %p1, i16 %p2) {
; CHECK-LABEL: @bar(
; CHECK-NEXT:    ret i16 [[P2:%.*]]
;
  ret i16 %p2
}