[LangRef] Remove incorrect vector alignment rules
authorFraser Cormack <fraser@codeplay.com>
Mon, 25 Oct 2021 14:47:50 +0000 (15:47 +0100)
committerFraser Cormack <fraser@codeplay.com>
Tue, 14 Dec 2021 14:35:40 +0000 (14:35 +0000)
commit8002fa67603b4e2fa7384bb0bbad2a649252271f
treef728dc713d717ea6bd78b4498593f046395fd396
parent10a356c47a30ee8544b3ecd5dc0adf3f634abe2c
[LangRef] Remove incorrect vector alignment rules

The LangRef incorrectly says that if no exact match is found when
seeking alignment for a vector type, the largest vector type smaller
than the sought-after vector type. This is incorrect as vector types
require an exact match, else they fall back to reporting the natural
alignment.

The corrected rule was not added in its place, as rules for other types
(e.g., floating-point types) aren't documented.

A unit test was added to demonstrate this.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D112463
llvm/docs/LangRef.rst
llvm/unittests/IR/DataLayoutTest.cpp