Matt Arsenault 997d7d1931 InstCombine: Convert some tests to opaque pointers
Needed manual fixes:
  2008-01-06-VoidCast.ll
  alias.ll @0 type lost
  pr27703.ll totally confused
  pr44242.ll phi and update_test_checks
  pr44245.ll phi and update_test_checks

Needed re-running update_test_checks:
  2009-01-08-AlignAlloca.ll
  2009-02-20-InstCombine-SROA.ll
  addrspacecast.ll
  alloca-cast-debuginfo.ll
  alloca-in-non-alloca-as.ll
  alloca.ll
  icmp-gep.ll
  icmp-custom-dl.ll
  lifetime-no-null-opt.ll
  non-integral-pointers.ll
  pr33689_same_bitwidth.ll
  pr39908.ll
  scalable-cast-of-alloc.ll
  select-cmp-br.ll
  unpack-fca.ll

Converted to generated checks:
  2012-6-7-vselect-bitcast.ll
2022-12-01 23:08:57 -05:00

38 lines
1000 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -passes=instcombine %s | FileCheck %s
declare void @add_byval_callee(ptr)
declare void @add_byval_callee_2(ptr byval(double))
define void @add_byval(ptr %in) {
; CHECK-LABEL: @add_byval(
; CHECK-NEXT: call void @add_byval_callee(ptr byval(i64) [[IN:%.*]])
; CHECK-NEXT: ret void
;
call void @add_byval_callee(ptr byval(i64) %in)
ret void
}
define void @add_byval_2(ptr %in) {
; CHECK-LABEL: @add_byval_2(
; CHECK-NEXT: call void @add_byval_callee_2(ptr byval(i64) [[IN:%.*]])
; CHECK-NEXT: ret void
;
call void @add_byval_callee_2(ptr byval(i64) %in)
ret void
}
%t2 = type { i8 }
define void @vararg_byval(ptr %p) {
; CHECK-LABEL: @vararg_byval(
; CHECK-NEXT: call void (i8, ...) @vararg_callee(i8 undef, ptr byval([[T2:%.*]]) [[P:%.*]])
; CHECK-NEXT: ret void
;
call void (i8, ...) @vararg_callee(i8 undef, ptr byval(%t2) %p)
ret void
}
declare void @vararg_callee(i8, ...)