[PATCH] D62775: [SelectionDAG] Skip addrspacecast expansion when casting undef values

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 14:25:33 PDT 2019


efriedma added a comment.

> It's legitimate for a target to reject addrspacecasts which don't make sense.

Actually, I'm not sure this is right.  Clearly, if the underlying memory doesn't overlap, the result doesn't have to make sense.  This is a fundamental part of supporting overlapping address-spaces.  But actually rejecting it might impose some unexpected restrictions on optimizations (e.g. whether it's possible to combine two addrspace casts), so maybe it should actually just return undef?  LangRef currently doesn't say; probably worth clarifying.

> This bug was encountered whilst compiling the Rust libcore library for AVR.

I'm guessing blindly, but given the conversion doesn't produce a useful result on AVR, this probably indicates a bug in the Rust compiler.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62775/new/

https://reviews.llvm.org/D62775





More information about the llvm-commits mailing list