[llvm] TargetLibraryInfo: Use pointer index size to determine getSizeTSize(). (PR #118747)
Nicola Zaghen via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 5 06:00:24 PST 2024
================
@@ -8,11 +8,10 @@ target datalayout = "e-m:o-p:40:64:64:32-i64:64-f80:128-n8:16:32:64-S128"
@.str.1 = private unnamed_addr constant [2 x i8] c"w\00", align 1
@.str.2 = private unnamed_addr constant [4 x i8] c"str\00", align 1
-; Check fwrite is generated with arguments of ptr size, not index size
define internal void @fputs_test_custom_dl() {
; CHECK-LABEL: @fputs_test_custom_dl(
; CHECK-NEXT: [[CALL:%.*]] = call ptr @fopen(ptr nonnull @.str, ptr nonnull @.str.1)
-; CHECK-NEXT: [[TMP1:%.*]] = call i40 @fwrite(ptr nonnull @.str.2, i40 3, i40 1, ptr [[CALL]])
+; CHECK-NEXT: [[TMP1:%.*]] = call i32 @fwrite(ptr nonnull @.str.2, i32 3, i32 1, ptr %call)
----------------
nzaghen wrote:
This change looks fine -- at least the pointer index part and brings it in line with the original intent of the test.
A test editing commit seems to have changed the i32 to i40: https://github.com/llvm/llvm-project/commit/fcfc31fffb9a83416453e60bd0dff2df93c2ee20
https://github.com/llvm/llvm-project/pull/118747
More information about the llvm-commits
mailing list