Skip to content

[DirectX] Update test after opt learned to infer datalayout #70726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

bogner
Copy link
Contributor

@bogner bogner commented Oct 30, 2023

Since e39f6c1 "[opt] Infer DataLayout from triple if not specified", this test (correctly) emits a load of an i64 with 8 byte alignment, rather than with 4 byte alignment.

Since e39f6c1 "[opt] Infer DataLayout from triple if not
specified", this test (correctly) emits a load of an i64 with 8 byte
alignment, rather than with 4 byte alignment.
@bogner bogner self-assigned this Oct 30, 2023
@llvmbot
Copy link
Member

llvmbot commented Oct 30, 2023

@llvm/pr-subscribers-backend-directx

Author: Justin Bogner (bogner)

Changes

Since e39f6c1 "[opt] Infer DataLayout from triple if not specified", this test (correctly) emits a load of an i64 with 8 byte alignment, rather than with 4 byte alignment.


Full diff: https://github.com/llvm/llvm-project/pull/70726.diff

1 Files Affected:

  • (modified) llvm/test/CodeGen/DirectX/typed_ptr.ll (+2-1)
diff --git a/llvm/test/CodeGen/DirectX/typed_ptr.ll b/llvm/test/CodeGen/DirectX/typed_ptr.ll
index 2975d85b9c96442..5453e87651dd725 100644
--- a/llvm/test/CodeGen/DirectX/typed_ptr.ll
+++ b/llvm/test/CodeGen/DirectX/typed_ptr.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
 ; RUN: opt -S -dxil-prepare < %s | FileCheck %s
 target triple = "dxil-unknown-unknown"
 
@@ -7,7 +8,7 @@ target triple = "dxil-unknown-unknown"
 define i64 @test(i64* %p) {
 ; CHECK-LABEL: define i64 @test(
 ; CHECK-SAME: ptr [[P:%.*]]) {
-; CHECK-NEXT:    [[V:%.*]] = load i64, ptr [[P]], align 4
+; CHECK-NEXT:    [[V:%.*]] = load i64, ptr [[P]], align 8
 ; CHECK-NEXT:    ret i64 [[V]]
 ;
   %v = load i64, i64* %p

Copy link
Contributor

@dmpots dmpots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bogner bogner merged commit 428af86 into llvm:main Oct 30, 2023
@bogner bogner deleted the directx-test-alignment branch October 30, 2023 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants