[PATCH] D85159: [ConstProp] Remove ConstantPropagation

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 10:43:38 PDT 2020


aeubanks marked an inline comment as done.
aeubanks added inline comments.


================
Comment at: llvm/test/Analysis/ConstantFolding/vscale.ll:210
-;
-  %i1 = insertelement <vscale x 4 x i32> undef, i32 1, i32 0
-  %i2 = shufflevector <vscale x 4 x i32> %i1, <vscale x 4 x i32> undef, <vscale x 4 x i32> zeroinitializer
----------------
fhahn wrote:
> why are those removed? Is that functionality missing from instsimplify?
Looks like in ConstProp it always calls `ConstantFoldInstruction()`, which in this case just returns the same value, and replaces all uses, inlining into the ret. But InstSimplify calls `SimplifyInstruction()` which special cases vector instructions but doesn't know how to simplify these values any more, so it returns nullptr and InstSimplify doesn't do anything.

Maybe inlining these values into the ret isn't super useful?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85159



More information about the llvm-commits mailing list