[PATCH] D150583: [IR] Add getAccessType to Instruction. NFC
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 01:02:57 PDT 2023
nikic added a comment.
Could you please also replace some reimplementations of this functionality with the helper, to show that it is generically useful?
================
Comment at: llvm/lib/IR/Instruction.cpp:749
+ case Instruction::Store:
+ return getOperand(0)->getType();
+ case Instruction::Load:
----------------
getPointerOperand()
================
Comment at: llvm/lib/IR/Instruction.cpp:753
+ case Instruction::AtomicCmpXchg:
+ return getType();
+ case Instruction::Call:
----------------
This is incorrect for cmpxchg, which returns a struct.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150583/new/
https://reviews.llvm.org/D150583
More information about the llvm-commits
mailing list