[PATCH] D142107: [AVR] Support address space casts
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 19 17:59:10 PST 2023
benshi001 accepted this revision.
benshi001 added a comment.
This revision is now accepted and ready to land.
LGTM. You can adopt my suggestion while committing.
================
Comment at: llvm/lib/Target/AVR/AVRTargetMachine.h:57
+ // pointers.
+ return getPointerSize(SrcAs) == getPointerSize(DestAs);
+ }
----------------
it would be better to also check the range, something like
```
return SrcAs < AVR::NumAddrSpaces && DestAs < AVR::NumAddrSpaces &&
getPointerSize(SrcAs) == getPointerSize(DestAs);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142107/new/
https://reviews.llvm.org/D142107
More information about the llvm-commits
mailing list