In DAGISel, the parameter alignment only have 4 bits to hold the value.
The encode(alignment) would plus the value by 1, so the max aligment that
ISel can support is 2^14. This patch verify align attribute for parameter.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
60,090 ms | x64 debian > libFuzzer.libFuzzer::large.test |
Event Timeline
llvm/lib/IR/Verifier.cpp | ||
---|---|---|
1830 | It seems align attribute doesn't affect ByRef. Run below code with "llc t.ll" doesn't crash. define dso_local void @foo(i8* %p) { entry: %p1 = bitcast i8* %p to <8 x float>* call void @bar(<8 x float>* noundef byref(<8 x float>) align 32768 %p1) ret void } declare dso_local void @bar(<8 x float>* %p) In https://llvm.org/docs/LangRef.html, it says Note that this attribute has additional semantics when combined with the byval or preallocated attribute, which are documented there. |
llvm/lib/IR/Verifier.cpp | ||
---|---|---|
1818 | ArgFlagsTy -> ISD::ArgFlagsTy |
llvm/lib/IR/Verifier.cpp | ||
---|---|---|
1819 | Good suggestion. I apply your suggestion in https://reviews.llvm.org/D121898. Will update this patch after D121898 land. |
ArgFlagsTy -> ISD::ArgFlagsTy