InstCombine: correctly change byval type attribute alongside call args.
authorTim Northover <tnorthover@apple.com>
Wed, 5 Jun 2019 20:38:17 +0000 (20:38 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 5 Jun 2019 20:38:17 +0000 (20:38 +0000)
commit8d7f118ab2b9e51d6cf2811291e319b4d977eb8c
treeca0fcb03305bd2e3e2890982d8960e1c5d62d599
parent607c8a9d1481312acb421425ac8c8df56a0c9012
InstCombine: correctly change byval type attribute alongside call args.

When the byval attribute has a type, it must match the pointee type of
any parameter; but InstCombine was not updating the attribute when
folding casts of various kinds away.

llvm-svn: 362643
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/test/Transforms/InstCombine/byval.ll [new file with mode: 0644]