[llvm] [EarlyCSE] Remove void return restriction for call CSE (PR #145320)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 07:50:18 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) {
----------------
preames wrote:
Once upon a time, we had a baked in assumption that in order to throw, a routine must write memory. Have we changed that at some point? I'm asking because otherwise, a void readonly call would seem to have no observable effect and thus be trivially dead?
https://github.com/llvm/llvm-project/pull/145320
More information about the llvm-commits
mailing list