From 413b4998bd722ab671e29e6dff5d458d1869f39b Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 30 Sep 2020 13:39:18 +0100 Subject: [PATCH] [InstCombine] recognizeBSwapOrBitReverseIdiom - use ArrayRef::back() helper. NFCI. Post-commit feedback on D88316 --- llvm/lib/Transforms/Utils/Local.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 463c6f1..a76dc65 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -3027,7 +3027,7 @@ bool llvm::recognizeBSwapOrBitReverseIdiom( "Illegal bit provenance index"); // If the upper bits are zero, then attempt to perform as a truncated op. - if (BitProvenance[BitProvenance.size() - 1] == BitPart::Unset) { + if (BitProvenance.back() == BitPart::Unset) { while (!BitProvenance.empty() && BitProvenance.back() == BitPart::Unset) BitProvenance = BitProvenance.drop_back(); if (BitProvenance.empty()) -- 2.7.4