[PATCH] D144445: [ConstantFold][InstSimplify] folding load for constant global all-element-equal arrays and structs

JunMa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 20 23:51:03 PST 2023


junparser added a comment.

Also, please take care of  compiler time regression.



================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:770
 
+Constant *llvm::ConstantFoldLoadFromAllEqAggregate(Constant *C, Type *Ty) {
+
----------------
What you need maybe something like Constant::getSplatValue with proper handle with constant struct and array


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

https://reviews.llvm.org/D144445



More information about the llvm-commits mailing list