[PATCH] D100923: [ConstFold] Constant fold load through invariant group intrinsics
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 21 13:35:34 PDT 2021
nikic added a comment.
This looks like a pretty serious layering violation, in that constants folding is now no longer folding constants. LLVM pretty strictly separates ConstantFold (folding instructions with all-constant operands), InstSimplify (folding instructions to a constant or existing instruction) and InstCombine (folding arbitrarily). This patch blurs the line between ConstantFold and InstSimplify.
================
Comment at: llvm/test/Transforms/InstCombine/invariant.group-load.ll:3
+
+; CHECK: ret i64 3
+
----------------
Please prefer update_test_checks.py unless there is some specific reason not to use it (e.g. huge output). Also, if this already folds with just `-instsimplify`, please test it there instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100923/new/
https://reviews.llvm.org/D100923
More information about the llvm-commits
mailing list