[AttributeFuncs] Consider `align` in `typeIncompatible`
authorJohannes Doerfert <johannes@jdoerfert.de>
Tue, 8 Sep 2020 15:10:36 +0000 (10:10 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Tue, 6 Oct 2020 04:23:05 +0000 (23:23 -0500)
commit2a078c3072043541ee0595aea6c8d7909f94c6f9
tree5c638da3dce4540ba8972de16ba18c39155c6ee6
parentb9888980132e5511e85d4172a46e02475957298b
[AttributeFuncs] Consider `align` in `typeIncompatible`

Alignment attributes need to be dropped for non-pointer values.
This also introduces a check into the verifier to ensure you don't use
`align` on anything but a pointer. Test needed to be adjusted
accordingly.

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D87304
llvm/lib/IR/Attributes.cpp
llvm/test/Bitcode/attributes-3.3.ll
llvm/test/Bitcode/attributes-3.3.ll.bc
llvm/test/Bitcode/attributes.ll
llvm/test/Transforms/DeadArgElim/returned.ll
llvm/test/Transforms/LoopSimplify/unreachable-loop-pred.ll
llvm/test/Verifier/align.ll [new file with mode: 0644]
llvm/test/Verifier/byref.ll