-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[msan][NFCI] Add tests for sum long across vector #125761
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
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
64 changes: 64 additions & 0 deletions
64
llvm/test/Instrumentation/MemorySanitizer/AArch64/arm64-vaddlv.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,64 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4 | ||
; RUN: opt < %s -passes=msan -S | FileCheck %s | ||
; | ||
; Forked from llvm/test/CodeGen/AArch64/arm64-vaddlv.ll | ||
; | ||
; Currently handled (suboptimally) by handleUnknownInstruction: | ||
; - llvm.aarch64.neon.saddlv | ||
; - llvm.aarch64.neon.uaddlv | ||
|
||
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" | ||
target triple = "aarch64--linux-android9001" | ||
|
||
define i64 @test_vaddlv_s32(<2 x i32> %a1) nounwind readnone #0 { | ||
; CHECK-LABEL: define i64 @test_vaddlv_s32( | ||
; CHECK-SAME: <2 x i32> [[A1:%.*]]) #[[ATTR0:[0-9]+]] { | ||
; CHECK-NEXT: entry: | ||
; CHECK-NEXT: [[TMP0:%.*]] = load <2 x i32>, ptr @__msan_param_tls, align 8 | ||
; CHECK-NEXT: call void @llvm.donothing() | ||
; CHECK-NEXT: [[TMP1:%.*]] = bitcast <2 x i32> [[TMP0]] to i64 | ||
; CHECK-NEXT: [[_MSCMP:%.*]] = icmp ne i64 [[TMP1]], 0 | ||
; CHECK-NEXT: br i1 [[_MSCMP]], label [[TMP2:%.*]], label [[TMP3:%.*]], !prof [[PROF1:![0-9]+]] | ||
; CHECK: 2: | ||
; CHECK-NEXT: call void @__msan_warning_noreturn() #[[ATTR3:[0-9]+]] | ||
; CHECK-NEXT: unreachable | ||
; CHECK: 3: | ||
; CHECK-NEXT: [[VADDLV_I:%.*]] = tail call i64 @llvm.aarch64.neon.saddlv.i64.v2i32(<2 x i32> [[A1]]) #[[ATTR2:[0-9]+]] | ||
; CHECK-NEXT: store i64 0, ptr @__msan_retval_tls, align 8 | ||
; CHECK-NEXT: ret i64 [[VADDLV_I]] | ||
; | ||
entry: | ||
%vaddlv.i = tail call i64 @llvm.aarch64.neon.saddlv.i64.v2i32(<2 x i32> %a1) nounwind | ||
ret i64 %vaddlv.i | ||
} | ||
|
||
define i64 @test_vaddlv_u32(<2 x i32> %a1) nounwind readnone #0 { | ||
; CHECK-LABEL: define i64 @test_vaddlv_u32( | ||
; CHECK-SAME: <2 x i32> [[A1:%.*]]) #[[ATTR0]] { | ||
; CHECK-NEXT: entry: | ||
; CHECK-NEXT: [[TMP0:%.*]] = load <2 x i32>, ptr @__msan_param_tls, align 8 | ||
; CHECK-NEXT: call void @llvm.donothing() | ||
; CHECK-NEXT: [[TMP1:%.*]] = bitcast <2 x i32> [[TMP0]] to i64 | ||
; CHECK-NEXT: [[_MSCMP:%.*]] = icmp ne i64 [[TMP1]], 0 | ||
; CHECK-NEXT: br i1 [[_MSCMP]], label [[TMP2:%.*]], label [[TMP3:%.*]], !prof [[PROF1]] | ||
; CHECK: 2: | ||
; CHECK-NEXT: call void @__msan_warning_noreturn() #[[ATTR3]] | ||
; CHECK-NEXT: unreachable | ||
; CHECK: 3: | ||
; CHECK-NEXT: [[VADDLV_I:%.*]] = tail call i64 @llvm.aarch64.neon.uaddlv.i64.v2i32(<2 x i32> [[A1]]) #[[ATTR2]] | ||
; CHECK-NEXT: store i64 0, ptr @__msan_retval_tls, align 8 | ||
; CHECK-NEXT: ret i64 [[VADDLV_I]] | ||
; | ||
entry: | ||
%vaddlv.i = tail call i64 @llvm.aarch64.neon.uaddlv.i64.v2i32(<2 x i32> %a1) nounwind | ||
ret i64 %vaddlv.i | ||
} | ||
|
||
declare i64 @llvm.aarch64.neon.uaddlv.i64.v2i32(<2 x i32>) nounwind readnone | ||
|
||
declare i64 @llvm.aarch64.neon.saddlv.i64.v2i32(<2 x i32>) nounwind readnone | ||
|
||
attributes #0 = { sanitize_memory } | ||
;. | ||
; CHECK: [[PROF1]] = !{!"branch_weights", i32 1, i32 1048575} | ||
;. |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the test name different to the intrinsic name?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cloned from llvm/test/CodeGen/AArch64/arm64-vaddlv.ll so I don't know for sure, but my guess is: