[PATCH] D75915: [GlobalISel] combine G_TRUNC with G_MERGE_VALUES
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 10 14:46:28 PDT 2020
paquette added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:203
+ const unsigned MergeSrcSize = MergeSrcTy.getSizeInBits();
+ if (DstTy.isScalar() && MergeSrcTy.isScalar()) {
+ if (DstSize < MergeSrcSize) {
----------------
It would be nice to just early return here and avoid a level of indentation.
```
if (!DstTy.isScalar() || !MergeSrcTy.isScalar())
return false;
```
================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:242-244
+ } else
+ // Unable to combine
+ return false;
----------------
Can we put braces around this else?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75915/new/
https://reviews.llvm.org/D75915
More information about the llvm-commits
mailing list