[PATCH] D122783: [PowerPC] Mark side effects of Power9 darn instruction

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 18:21:15 PDT 2022


nemanjai added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1041
 
+let hasSideEffects = 1 in {
+def DARN : XForm_45<31, 755, (outs g8rc:$RT), (ins u2imm:$L),
----------------
Could you please commit a follow-up patch with a comment explaining why this flag is set. The instruction doesn't really have side effects in that it modifies some machine state, the flag is presumably needed so the instruction doesn't get optimized out.


================
Comment at: llvm/test/CodeGen/PowerPC/builtins-ppc-p9-darn.ll:37
 
+define i64 @darn_side_effect() {
+; CHECK-LABEL: darn_side_effect:
----------------
As general guidance, it is preferred if you pre-commit a test case like this with the original code generation so that the review (and subsequent commit) shows how the code generation changes as a result of the patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122783/new/

https://reviews.llvm.org/D122783



More information about the llvm-commits mailing list