[llvm] [LV] Improve a test; get rid of runtime checks (PR #152182)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 5 11:18:11 PDT 2025


================
@@ -107,13 +98,10 @@ define void @test2(ptr nocapture readonly %d) {
 ; CHECK:       [[SCALAR_PH]]:
 ;
 entry:
-  %b = getelementptr inbounds %struct.data, ptr %d, i64 0, i32 1
-  %0 = load ptr, ptr %b, align 8
-  %ptrint = ptrtoint ptr %0 to i64
+  %ptrint = ptrtoint ptr %a to i64
   %maskedptr = and i64 %ptrint, 31
   %maskcond = icmp eq i64 %maskedptr, 0
-  %1 = load ptr, ptr %d, align 8
-  %ptrint2 = ptrtoint ptr %1 to i64
+  %ptrint2 = ptrtoint ptr %b to i64
   %maskedptr3 = and i64 %ptrint2, 31
   %maskcond4 = icmp eq i64 %maskedptr3, 0
----------------
fhahn wrote:

I guess all of the conditions could also be args, how they get computed doesn't really matter for the test.

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


More information about the llvm-commits mailing list