[PATCH] D31194: [InstSimplify] Try to Constant Fold the Instruction before simplification

Joey Gouly via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 21 10:16:33 PDT 2017


joey created this revision.

Call ConstantFoldInstruction before trying any other simplification.

test/Analysis/ConstantFolding/gep-constanfolding-error.ll has a regex because there is a difference in the integer types after old/new GVN.
test/Transforms/InstSimplify/vector_gep.ll, I am unsure why the indices for the vector are turned into i64.

Noticed a change in IR after r276727 (e37fa0be6d80d863647db12f0d8e8c7d62bf6f3d).


Repository:
  rL LLVM

https://reviews.llvm.org/D31194

Files:
  lib/Analysis/InstructionSimplify.cpp
  test/Analysis/ConstantFolding/gep-constanfolding-error.ll
  test/Transforms/GVN/PRE/2011-06-01-NonLocalMemdepMiscompile.ll
  test/Transforms/InstSimplify/compare.ll
  test/Transforms/InstSimplify/simplify-nested-bitcast.ll
  test/Transforms/InstSimplify/vector_gep.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31194.92502.patch
Type: text/x-patch
Size: 9316 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170321/5c3843db/attachment.bin>


More information about the llvm-commits mailing list