[PATCH] D47143: [InstrSimplify, NewGVN] Add option to ignore additional instr info when simplifying.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 14 16:06:17 PDT 2018


fhahn added a comment.

In https://reviews.llvm.org/D47143#1199218, @hiraditya wrote:

> LGTM with the minor nit.


Thanks for having a look!

I went through the list of outstanding NewGVN issues today and the issue fixed in this patch was causing 3-4 reported miscompiles with NewGVN. Unfortunately there are some cases where we could still use metadata while simplifying (e.g. if all members of the congruence class have the same metadata), but I don't see a sane way of ensuring that (e.g. new members without metadata could be added to a class after we simplified the leader).



================
Comment at: include/llvm/Analysis/InstructionSimplify.h:85
+    if (UseInstrInfo)
+      return cast<PossiblyExactOperator>(Op)->isExact();
+    return false;
----------------
hiraditya wrote:
> I see other places use isa to first check if BinaryOperator isa PossiblyExactOperator , or a dyn_cast maybe.
Will update before committing, thanks!


https://reviews.llvm.org/D47143





More information about the llvm-commits mailing list