diff options
author | Shengchen Kan <shengchen.kan@intel.com> | 2022-11-21 20:59:22 +0800 |
---|---|---|
committer | Shengchen Kan <shengchen.kan@intel.com> | 2022-11-21 21:00:07 +0800 |
commit | 861f5dd688c19d206cc44718be9ff75894065d46 (patch) | |
tree | e8a9d35a0afb9178b3af202ab95ab63bfb52f912 /llvm/tools/llvm-readobj/llvm-readobj.cpp | |
parent | 2a3ac7fd0c9e25ecad272243dabc155e348f2910 (diff) | |
download | llvm-861f5dd688c19d206cc44718be9ff75894065d46.zip llvm-861f5dd688c19d206cc44718be9ff75894065d46.tar.gz llvm-861f5dd688c19d206cc44718be9ff75894065d46.tar.bz2 |
[X86][NFC] Minor improvement in X86InstrInfo::optimizeCompareInstr
Before this patch, the code enumerated `getCondFromBranch`, `getCondFromSETCC` and `getCondFromFromCMov` to get the condition code of a `MachineInstr`, and assigned the result to variable `OldCC` when `MI || IsSwapped || ImmDelta != 0` was satisfiled.
After this patch, the `if-else` structure is eliminated by using `getCondFromMI`. Since `OldCC` is only used when `MI || IsSwapped || ImmDelta != 0` is true, it is initialized with `getCondFromMI` directly outside the scope of `if` now.
Reviewed By: pengfei
Differential Revision: https://reviews.llvm.org/D138349
Diffstat (limited to 'llvm/tools/llvm-readobj/llvm-readobj.cpp')
0 files changed, 0 insertions, 0 deletions