[llvm] [CodeGen] Use TargetLowering for TypeInfo of PointerTy (PR #93469)
Jessica Clarke via llvm-commits
llvm-commits at lists.llvm.org
Tue May 28 11:59:00 PDT 2024
jrtc27 wrote:
The test case needs `REQUIRES: asserts` as -debug-only doesn't always exist (yes, assertions and debug a bit conflated...), and you can strip out a bunch of comments and attributes. Testing locally, the following still seems to trigger the same assertion:
```diff
diff --git a/llvm/test/Analysis/CostModel/X86/handle-iptr-with-data-layout-to-not-assert.ll b/llvm/test/Analysis/CostModel/X86/handle-iptr-with-data-layout-to-not-assert.ll
index 5278085b1182..d03dab7f7b14 100644
--- a/llvm/test/Analysis/CostModel/X86/handle-iptr-with-data-layout-to-not-assert.ll
+++ b/llvm/test/Analysis/CostModel/X86/handle-iptr-with-data-layout-to-not-assert.ll
@@ -1,9 +1,9 @@
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --filter "LV: Found an estimated cost of [0-9] for VF [0-9] For instruction:\s*store ptr %[0-9], ptr %__last" --filter "LV: Found an estimated cost of [0-9] for VF [0-9] For instruction:\s*store ptr %[0-9]" --version 5
+; REQUIRES: asserts
; RUN: opt -passes=loop-vectorize -debug-only=loop-vectorize -S < %s 2>&1 | FileCheck %s --check-prefix=CHECK_IPTR
target triple = "x86_64-unknown-linux-gnu"
-; Function Attrs: nofree norecurse nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none)
-define noalias ptr @foo(ptr readonly %__first, ptr writeonly %__last) #0 {
+define ptr @foo(ptr %__first, ptr %__last) #0 {
; CHECK_IPTR-LABEL: 'foo'
; CHECK_IPTR: LV: Found an estimated cost of 1 for VF 1 For instruction: store ptr %0, ptr %__last, align 8
; CHECK_IPTR: LV: Found an estimated cost of 2 for VF 2 For instruction: store ptr %0, ptr %__last, align 8
@@ -14,10 +14,10 @@ entry:
%cmp.not1 = icmp eq ptr %__first, %__last
br i1 %cmp.not1, label %for.end, label %for.body.preheader
-for.body.preheader: ; preds = %entry
+for.body.preheader:
br label %for.body
-for.body: ; preds = %for.body.preheader, %for.body
+for.body:
%__first.addr.02 = phi ptr [ %incdec.ptr, %for.body ], [ %__first, %for.body.preheader ]
%0 = load ptr, ptr %__first.addr.02, align 8
store ptr %0, ptr %__last, align 8
@@ -25,10 +25,10 @@ for.body: ; preds = %for.body.preheader,
%cmp.not = icmp eq ptr %incdec.ptr, %__last
br i1 %cmp.not, label %for.end.loopexit, label %for.body
-for.end.loopexit: ; preds = %for.body
+for.end.loopexit:
br label %for.end
-for.end: ; preds = %for.end.loopexit, %entry
+for.end:
ret ptr null
}
```
Also, please use kebab-case rather than snake_case for your FileCheck prefix, though given there's just the one in use why not just leave it at the default CHECK?
https://github.com/llvm/llvm-project/pull/93469
More information about the llvm-commits
mailing list