mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-07 12:30:44 +00:00
e1e21627c0
Reviewers: tra Subscribers: jholewinski, arsenm, asbirlea Differential Revision: https://reviews.llvm.org/D22592 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276196 91177308-0d34-0410-b5e6-96231b3b80d8
18 lines
560 B
LLVM
18 lines
560 B
LLVM
; RUN: llc < %s | FileCheck -check-prefix=ENABLED %s
|
|
; RUN: llc -disable-nvptx-load-store-vectorizer < %s | FileCheck -check-prefix=DISABLED %s
|
|
target triple = "nvptx64-nvidia-cuda"
|
|
|
|
; Check that the load-store vectorizer is enabled by default for nvptx, and
|
|
; that it's disabled by the appropriate flag.
|
|
|
|
; ENABLED: ld.v2.{{.}}32
|
|
; DISABLED: ld.{{.}}32
|
|
; DISABLED: ld.{{.}}32
|
|
define i32 @f(i32* %p) {
|
|
%p.1 = getelementptr i32, i32* %p, i32 1
|
|
%v0 = load i32, i32* %p, align 8
|
|
%v1 = load i32, i32* %p.1, align 4
|
|
%sum = add i32 %v0, %v1
|
|
ret i32 %sum
|
|
}
|