[PATCH] D158256: [RISCV] Fix assertion failure when zcmp extension is enabled.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 18:11:17 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/frame-lowering-crash.ll:75
+for.body:                                         ; preds = %for.cond
+  store i32 0, ptr null, align 4
+  br label %for.cond
----------------
anmolparalkar-nxp wrote:
> jrtc27 wrote:
> > This seems overly-reduced
> @jrtc27 Kindly clarify (overly-reduced) I'll include matter as necessary, thanks.
`icmp slt i32 poison, poison` doesn't make sense. The compiler would be allowed to delete it. So a future optimization could break this test.

`store i32 0, ptr null, align 4` is a store to null which is undefined behavior. So the compiler is allowed to delete it. Again a future optimization could delete it and break this test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158256



More information about the llvm-commits mailing list