[all-commits] [llvm/llvm-project] 9b45fd: [AlignFromAssume] Bailout w/non-constant alignment...
Philip Reames via All-commits
all-commits at lists.llvm.org
Tue Aug 31 09:21:11 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9b45fd909ffa754acbb4e927bc2d55c7ab0d4e3f
https://github.com/llvm/llvm-project/commit/9b45fd909ffa754acbb4e927bc2d55c7ab0d4e3f
Author: Philip Reames <listmail at philipreames.com>
Date: 2021-08-31 (Tue, 31 Aug 2021)
Changed paths:
M llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
M llvm/test/Transforms/AlignmentFromAssumptions/simple.ll
Log Message:
-----------
[AlignFromAssume] Bailout w/non-constant alignments (pr51680)
This is a bailout for pr51680. This pass appears to assume that the alignment operand to an align tag on an assume bundle is constant. This doesn't appear to be required anywhere, and clang happily generates non-constant alignments for cases such as this case taken from the bug report:
// clang -cc1 -triple powerpc64-- -S -O1 opal_pci-min.c
extern int a[];
long *b;
long c;
void *d(long, int *, int, long, long, long) __attribute__((__alloc_align__(6)));
void e() {
b = d(c, a, 0, 0, 5, c);
b[0] = 0;
}
This was exposed by a SCEV change which allowed a non-constant alignment to reach further into the pass' code. We could generalize the pass, but for now, let's fix the crash.
More information about the All-commits
mailing list