Skip to content

Commit

Permalink
asm mode: only create deref constraints if align > load size
Browse files Browse the repository at this point in the history
Otherwise the constraint is implied
  • Loading branch information
nunoplopes committed Dec 25, 2023
1 parent ff88897 commit 3dbff83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,7 @@ void Transform::preprocess() {
for (auto &i : bb->instrs()) {
if (auto *load = dynamic_cast<const Load*>(&i)) {
auto align = load->getAlign();
if (align != 1) {
if (align > load->getMaxAccessSize()) {
static IntType i64("i64", 64);
auto bytes = make_unique<IntConst>(i64, align);
to_add.emplace_back(load, make_unique<Assume>(
Expand Down

0 comments on commit 3dbff83

Please sign in to comment.