[PATCH] D120428: [AArch64] Optimize safe integer division
Karl Meakin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 24 02:29:52 PST 2022
Kmeakin added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp:325
+ auto *RhsDef = MRI->getUniqueVRegDef(RhsReg);
+ auto *FlagsDef = MRI->getUniqueVRegDef(FlagsReg);
+
----------------
dmgreen wrote:
> Isn't FlagsReg AArch64::NZCV? How does that work with getUniqueVRegDef?
`FlagsReg` is indeed `NZCV`, but it is updated by flag-setting instructions (eg `SUBS`), so `getUniqueVRegDef` will return the instruction that sets the flags.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120428/new/
https://reviews.llvm.org/D120428
More information about the llvm-commits
mailing list