44 lines · plain
1; RUN: opt < %s -passes=instcombine -data-layout="p:32:32" -S | FileCheck %s --check-prefixes=CHECK,CHECK322; RUN: opt < %s -passes=instcombine -data-layout="p:64:64" -S | FileCheck %s --check-prefixes=CHECK,CHECK643 4define signext i32 @b(ptr inreg %x) {5 ret i32 06}7 8define void @c(...) {9 ret void10}11 12declare void @useit(i32)13 14define void @d(i32 %x, ...) {15 call void @useit(i32 %x)16 ret void17}18 19define void @naked_func() naked {20 tail call void asm sideeffect "mov r1, r0", ""()21 unreachable22}23 24define void @g(ptr %y) {25 call i32 @b(i32 zeroext 0)26 call void @c(ptr %y)27 call void @c(ptr sret(i32) %y)28 call void @d(i32 0, ptr sret(i32) %y)29 call void @d(i32 0, ptr captures(none) %y)30 call void @d(ptr noundef captures(none) %y)31 call void @naked_func(i32 1)32 ret void33}34; CHECK-LABEL: define void @g(ptr %y)35; CHECK: call i32 @b(i32 zeroext 0)36; CHECK: call void (...) @c(ptr %y)37; CHECK: call void @c(ptr sret(i32) %y)38; CHECK: call void @d(i32 0, ptr sret(i32) %y)39; CHECK: call void (i32, ...) @d(i32 0, ptr captures(none) %y)40; CHECK32: %2 = ptrtoint ptr %y to i3241; CHECK32: call void (i32, ...) @d(i32 noundef %2)42; CHECK64: call void @d(ptr noundef captures(none) %y)43; CHECK: call void @naked_func(i32 1)44