[llvm] [EarlyCSE] Remove void return restriction for call CSE (PR #145320)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 23 07:59:23 PDT 2025


================
@@ -146,6 +146,28 @@ define i32 @test5(ptr%P) {
   ret i32 %Diff
 }
 
+declare void @void_func()
+
+define void @void_func_cse_readonly(ptr %P) {
----------------
dtcxzyw wrote:

https://godbolt.org/z/GMeqhaMTj It needs `nounwind/willreturn` to eliminate the call.


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


More information about the llvm-commits mailing list