[clang] [llvm] [IR] Require DataLayout for pointer cast elimination (PR #162279)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 7 06:06:50 PDT 2025
================
@@ -8,10 +8,12 @@ define void @and_constexpr(i32 %a) {
; CHECK-LABEL: @and_constexpr(
; CHECK-NEXT: entry:
; CHECK-NEXT: call void @use.i32(i32 0)
-; CHECK-NEXT: [[AND_2:%.*]] = and i32 20, [[A:%.*]]
+; CHECK-NEXT: [[AND_2:%.*]] = and i32 ptrtoint (ptr inttoptr (i32 20 to ptr) to i32), [[A:%.*]]
----------------
nikic wrote:
I wasn't sure what to do with this test. Previously the constant expression here just folded away, so it wasn't really testing constant expressions, as the test name indicates. So I decided to leave this as-is.
https://github.com/llvm/llvm-project/pull/162279
More information about the llvm-commits
mailing list