[llvm] [SDAG] Fix CSE for ADDRSPACECAST nodes (PR #122912)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 18:53:55 PST 2025


================
@@ -0,0 +1,19 @@
+; RUN: llc < %s -mcpu=sm_80 -mattr=+ptx73 -debug-only=isel -o /dev/null 2>&1 | FileCheck %s
+
+; REQUIRES: asserts
+
+target triple = "nvptx64-nvidia-cuda"
+
+;; Selection DAG CSE is hard to test since we run CSE/GVN on the IR before and
+;; after selection DAG ISel so most cases will be handled by one of these.
----------------
arsenm wrote:

You could also hack around this with -O0, the CSE always happens at any opt level (a dirtier hack would be use -start-before/after). I'm not sure I understand how stackrestore helps here.

https://github.com/llvm/llvm-project/pull/122912


More information about the llvm-commits mailing list