[all-commits] [llvm/llvm-project] 295059: [PatternMatch] Use dyn_cast in CastInst_match inst...
Craig Topper via All-commits
all-commits at lists.llvm.org
Mon Jan 29 11:16:49 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 295059409f75e13bf000d536cb8d287e35153c83
https://github.com/llvm/llvm-project/commit/295059409f75e13bf000d536cb8d287e35153c83
Author: Craig Topper <craig.topper at sifive.com>
Date: 2024-01-29 (Mon, 29 Jan 2024)
Changed paths:
M llvm/include/llvm/IR/PatternMatch.h
Log Message:
-----------
[PatternMatch] Use dyn_cast in CastInst_match instead of checking opcode. NFC (#79878)
Using dyn_cast allows us to use CastInst::getOperand instead of
Instruction::getOperand. This is more efficient since
CastInst::getOperand doesn't need to check how the operands are stored.
Instruction::getOperand has to consider HungOffUses.
More information about the All-commits
mailing list