[Verifier] Verify parameter alignment.
authorLuo, Yuanke <yuanke.luo@intel.com>
Thu, 17 Mar 2022 09:48:02 +0000 (17:48 +0800)
committerLuo, Yuanke <yuanke.luo@intel.com>
Sun, 27 Mar 2022 00:35:05 +0000 (08:35 +0800)
commit321cbf75be2c0f4f33856f4b1246f09800cc91d0
tree350a5b4ee82cc77a7205138751d5a6dc55109a88
parent460e1bd66e5757be06efc5bbb5f686fd8c119a02
[Verifier] Verify parameter alignment.

In DAGISel, the parameter alignment only have 4 bits to hold the value.
The encode(alignment) would plus the shift value by 1, so the max aligment
ISel can support is 2^14. This patch verify the parameter and return
value for alignment.

Differential Revision: https://reviews.llvm.org/D121898
llvm/include/llvm/CodeGen/TargetCallingConv.h
llvm/lib/IR/Verifier.cpp
llvm/test/Verifier/param-align.ll [new file with mode: 0644]
llvm/test/Verifier/param-ret-align.ll [new file with mode: 0644]