[PATCH] D21460: [JumpThreading] Fix handling of aliasing metadata.

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 00:24:19 PDT 2016


eli.friedman created this revision.
eli.friedman added reviewers: hfinkel, rafael, chandlerc.
eli.friedman added subscribers: llvm-commits, yuyichao.

The correctness fix here is that when we CSE a load with another load,
we need to combine the metadata on the two loads. This matches the
behavior of other passes, like instcombine and GVN.

There's also a minor optimization improvement here: for load PRE, the
aliasing metadata on the inserted load should be the same as the
metadata on the original load. Not sure why the old code was throwing
it away.

Issue found by inspection.

http://reviews.llvm.org/D21460

Files:
  include/llvm/Analysis/Loads.h
  lib/Analysis/Loads.cpp
  lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  lib/Transforms/Scalar/JumpThreading.cpp
  test/Transforms/JumpThreading/thread-loads.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21460.61067.patch
Type: text/x-patch
Size: 7991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160617/c68bbea5/attachment.bin>


More information about the llvm-commits mailing list