-
Notifications
You must be signed in to change notification settings - Fork 13.7k
[DirectX] replace byte splitting via vector bitcast with scalar #140167
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ea7c0db
[DirectX] replace byte splitting via vector bitcast with scalar
farzonl b63502c
address pr comment
farzonl fb6ef48
Add Legalization stages. Passes that change the same instructions nee…
farzonl 2002521
address pr feedback
farzonl ccbe953
address PR comment to hoist data structures and clear them in loops i…
farzonl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
18 changes: 18 additions & 0 deletions
18
llvm/test/CodeGen/DirectX/legalize-i64-high-low-vec-split.ll
This file contains hidden or 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,18 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 | ||
; RUN: opt -S -passes='dxil-legalize' -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s | ||
|
||
define void @split_via_extract(i64 noundef %a) { | ||
; CHECK-LABEL: define void @split_via_extract( | ||
; CHECK-SAME: i64 noundef [[A:%.*]]) { | ||
; CHECK-NEXT: [[ENTRY:.*:]] | ||
; CHECK-NEXT: [[TMP0:%.*]] = trunc i64 [[A]] to i32 | ||
; CHECK-NEXT: [[TMP1:%.*]] = lshr i64 [[A]], 32 | ||
; CHECK-NEXT: [[TMP2:%.*]] = trunc i64 [[TMP1]] to i32 | ||
; CHECK-NEXT: ret void | ||
; | ||
entry: | ||
%vecA = bitcast i64 %a to <2 x i32> | ||
%low = extractelement <2 x i32> %vecA, i32 0 ; low 32 bits | ||
%high = extractelement <2 x i32> %vecA, i32 1 ; high 32 bits | ||
ret void | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.