[all-commits] [llvm/llvm-project] f29645: [gvn] Handle a corner case w/vectors of non-integr...

Philip Reames via All-commits all-commits at lists.llvm.org
Thu Oct 1 19:20:39 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f29645e7afdbb8d1fc2dd603c0b128bac055625c
      https://github.com/llvm/llvm-project/commit/f29645e7afdbb8d1fc2dd603c0b128bac055625c
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2020-10-01 (Thu, 01 Oct 2020)

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

  Log Message:
  -----------
  [gvn] Handle a corner case w/vectors of non-integral pointers

If we try to coerce a vector of non-integral pointers to a narrower type (either narrower vector or single pointer), we use inttoptr and violate the semantics of non-integral pointers.  In theory, we can handle many of these cases, we just need to use a different code idiom to convert without going through inttoptr and back.

This shows up as wrong code bugs, and in some cases, crashes due to failed asserts.  Modeled after a change which has lived downstream for a couple years, though completely rewritten to be more idiomatic.




More information about the All-commits mailing list