As per the specification, whole register vector loads and stores may raise a
misaligned address exception "if the base address is not naturally aligned to
the larger of the size of the encoded EEW in bytes (EEW/8) or the
implementation’s smallest supported SEW size in bytes (SEWMIN/8)."
This patch adds a predicate to ensure the alignment is greater than or equal to
the EEW in bytes. It doesn't check SEWMIN however since the smallest SEW can be
with the standard extensions is 8 bytes.
Note that this doesn't fix the issue raised here:
https://reviews.llvm.org/D154536#inline-1495073
I'm actually not sure if we need to do this for stores anymore. From the spec:
So the whole register stores don't have EEW encoded with them: So is their EEW always 8 or is it taken from SEW? If it's taken from SEW then I think we would need a pseudo to propagate this information to insertvsetvli. Otherwise we don't actually need to check the alignment here.