[PATCH] D81578: [CodeGen] Fix warnings in getVectorTypeBreakdown
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 10 10:32:26 PDT 2020
david-arm marked 2 inline comments as done.
david-arm added inline comments.
================
Comment at: llvm/lib/CodeGen/TargetLoweringBase.cpp:1478
- // Convert sizes such as i33 to i64.
- if (!isPowerOf2_32(NewVTSize))
- NewVTSize = NextPowerOf2(NewVTSize);
-
- if (EVT(DestVT).bitsLT(NewVT)) // Value is expanded, e.g. i64 -> i16.
+ if (EVT(DestVT).bitsLT(NewVT)) { // Value is expanded, e.g. i64 -> i16.
+ TypeSize NewVTSize = NewVT.getSizeInBits();
----------------
sdesmalen wrote:
> Why did you reorder the conditions?
Because NewVTSize isn't used at all unless the bitsLT condition is met so it seemed wasteful to calculate it always.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81578/new/
https://reviews.llvm.org/D81578
More information about the llvm-commits
mailing list