[PATCH] D59730: [GVN] teach ConstantFolding correct handling of non-integral addrspace casts

Jameson Nash via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 29 12:28:47 PDT 2019


vtjnash updated this revision to Diff 207207.
vtjnash marked 2 inline comments as done.
vtjnash added a comment.

`FoldBitCast` was being instructed to create invalid IR in several test cases. We happened to fold away them away before the verifier noticed, so this adds an explicit check, and corrects the caller `FoldReinterpretLoadFromConstPtr` to form valid IR when handling vectors of pointers with this method.


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

https://reviews.llvm.org/D59730

Files:
  lib/Analysis/ConstantFolding.cpp
  lib/Transforms/Utils/VNCoercion.cpp
  test/Transforms/GVN/non-integral-pointers.ll
  test/Transforms/GlobalOpt/evaluate-call-errors.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59730.207207.patch
Type: text/x-patch
Size: 14283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190629/8174d54c/attachment.bin>


More information about the llvm-commits mailing list