[all-commits] [llvm/llvm-project] 700cf7: [VNCoercion] Disallow coercion between different n...

Valentin Churavy via All-commits all-commits at lists.llvm.org
Mon Dec 7 17:20:23 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 700cf7dcc927c0ffddc0a1acbfde490f673ffb4a
      https://github.com/llvm/llvm-project/commit/700cf7dcc927c0ffddc0a1acbfde490f673ffb4a
  Author: Valentin Churavy <v.churavy at gmail.com>
  Date:   2020-12-07 (Mon, 07 Dec 2020)

  Changed paths:
    M llvm/lib/Transforms/Utils/VNCoercion.cpp
    M llvm/test/Transforms/GVN/non-integral-pointers.ll

  Log Message:
  -----------
  [VNCoercion] Disallow coercion between different ni addrspaces

I'm not sure if it would be legal by the IR reference to introduce
an addrspacecast here, since the IR reference is a bit vague on
the exact semantics, but at least for our usage of it (and I
suspect for many other's usage) it is not. For us, addrspacecasts
between non-integral address spaces carry frontend information that the
optimizer cannot deduce afterwards in a generic way (though we
have frontend specific passes in our pipline that do propagate
these). In any case, I'm sure nobody is using it this way at
the moment, since it would have introduced inttoptrs, which
are definitely illegal.

Fixes PR38375

Co-authored-by: Keno Fischer <keno at alumni.harvard.edu>

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D50010




More information about the All-commits mailing list