[llvm] [DAG] Fold (vt trunc (extload (vt x))) -> (vt load x) (PR #75229)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 01:42:23 PST 2023
================
@@ -14818,15 +14818,14 @@ SDValue DAGCombiner::visitTRUNCATE(SDNode *N) {
if (SDValue Reduced = reduceLoadWidth(N))
return Reduced;
- // Handle the case where the load remains an extending load even
+ // Handle the case where the load remains a normal/extending load even
// after truncation.
----------------
jayfoad wrote:
Nit: maybe rewrite this comment? "normal/extending load" seems to cover all relevant options so it's not really saying anything useful now as-is?
Maybe something like "Handle the case where the truncated result is at least as wide as the loaded type"
https://github.com/llvm/llvm-project/pull/75229
More information about the llvm-commits
mailing list