[PATCH] D55950: [ConstantFolding] Fold undef for integer intrinsics
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 10 10:19:54 PST 2019
spatel added inline comments.
================
Comment at: lib/Analysis/ConstantFolding.cpp:1632
+static bool getConstIntOrUndef(Value *Op, const APInt * &C) {
+ if (auto *CI = dyn_cast<ConstantInt>(Op)) {
----------------
clang-format prefers "APInt *&C"?
(no space between * and &)
================
Comment at: test/Transforms/InstCombine/saturating-add-sub-vector.ll:22
; CHECK-LABEL: @sadd_sat_v16i8_constant_overflow(
; CHECK-NEXT: ret <16 x i8> <i8 2, i8 4, i8 6, i8 8, i8 10, i8 12, i8 14, i8 16, i8 18, i8 20, i8 127, i8 24, i8 26, i8 28, i8 30, i8 127>
;
----------------
nikic wrote:
> I think this test could be dropped in favor of `test/Analysis/ConstantFolding/saturating-add-sub.ll`. It should already cover everything, just with not quite as wide vectors...
Do you mean drop this whole file? Either way, I agree. Any tests that are just testing constant folding are better located in the ConstProp folder. If there's anything worth salvaging here, please move it. If not, let's just remove this file along with this commit.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55950/new/
https://reviews.llvm.org/D55950
More information about the llvm-commits
mailing list