[PATCH] D36996: [X86] Prevent several calls to ISD::isConstantSplatVector from returning a narrower APInt than the original scalar type
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 21 22:19:06 PDT 2017
chandlerc accepted this revision.
chandlerc added a comment.
This revision is now accepted and ready to land.
LGTM, minor nits below, feel free to submit whenever.
================
Comment at: include/llvm/CodeGen/SelectionDAGNodes.h:88
/// undefined, return true and return the constant value in \p SplatValue.
- bool isConstantSplatVector(const SDNode *N, APInt &SplatValue);
+ /// This returns the smallest possible splat unless AllowShrink is set to
+ /// false.
----------------
'returns' -> 'sets `SplatValue` to'
================
Comment at: test/CodeGen/X86/pr34271.ll:7
+; CHECK: # BB#0:
+; CHECK-NEXT: paddd {{.*}}(%rip), %xmm0
+; CHECK-NEXT: retq
----------------
The previous version of the generated code had a plausible instruction sequence that ultimately did the wrong thing... Is it possible to actually check the values being added here?
https://reviews.llvm.org/D36996
More information about the llvm-commits
mailing list