-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodeGen][X86] Use TargetLowering for TypeInfo of PointerTy (#93469)
This uses the TargetLowering getSimpleValueType mechanism to retrieve the ValueType info inside the X86 cost model. This resolves a build issue we were seeing for the miniQMC application after llvm/llvm-project#92671.
- Loading branch information
1 parent
a61379a
commit 4e5f351
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
llvm/test/Analysis/CostModel/X86/handle-iptr-with-data-layout-to-not-assert.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
; 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 | ||
target triple = "x86_64-unknown-linux-gnu" | ||
|
||
define ptr @foo(ptr %__first, ptr %__last) #0 { | ||
; CHECK-LABEL: 'foo' | ||
; CHECK: LV: Found an estimated cost of 1 for VF 1 For instruction: store ptr %0, ptr %__last, align 8 | ||
; CHECK: LV: Found an estimated cost of 2 for VF 2 For instruction: store ptr %0, ptr %__last, align 8 | ||
; CHECK: LV: Found an estimated cost of 3 for VF 4 For instruction: store ptr %0, ptr %__last, align 8 | ||
; CHECK: LV: Found an estimated cost of 3 for VF 8 For instruction: store ptr %0, ptr %__last, align 8 | ||
; | ||
entry: | ||
%cmp.not1 = icmp eq ptr %__first, %__last | ||
br i1 %cmp.not1, label %for.end, label %for.body.preheader | ||
|
||
for.body.preheader: | ||
br label %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 | ||
%incdec.ptr = getelementptr inbounds i8, ptr %__first.addr.02, i64 16 | ||
%cmp.not = icmp eq ptr %incdec.ptr, %__last | ||
br i1 %cmp.not, label %for.end.loopexit, label %for.body | ||
|
||
for.end.loopexit: | ||
br label %for.end | ||
|
||
for.end: | ||
ret ptr null | ||
} | ||
|
||
attributes #0 = { "target-cpu"="znver4" } |