xref: /llvm-project/llvm/test/Transforms/SCCP/arg-type-mismatch.ll (revision 0991da36906bdb29b8f1030d5123bafb58fee79e)
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature
2; RUN: opt < %s -passes=ipsccp -S -o - | FileCheck %s
3
4; This test is just to verify that we do not crash/assert due to mismatch in
5; argument type between the caller and callee.
6
7define dso_local void @foo(i16 %a) {
8; CHECK-LABEL: define {{[^@]+}}@foo
9; CHECK-SAME: (i16 [[A:%.*]]) {
10; CHECK-NEXT:    [[CALL:%.*]] = call i16 @bar(i16 [[A]], i32 7)
11; CHECK-NEXT:    ret void
12;
13  %call = call i16 @bar(i16 %a, i32 7)
14  ret void
15}
16
17define internal i16 @bar(i16 %p1, i16 %p2) {
18; CHECK-LABEL: define {{[^@]+}}@bar
19; CHECK-SAME: (i16 [[P1:%.*]], i16 [[P2:%.*]]) {
20; CHECK-NEXT:    ret i16 [[P2]]
21;
22  ret i16 %p2
23}
24
25
26