1*cd564c6bSJustin Lebar; RUN: llc < %s | FileCheck -check-prefix=ENABLED %s
2*cd564c6bSJustin Lebar; RUN: llc -disable-nvptx-load-store-vectorizer < %s | FileCheck -check-prefix=DISABLED %s
3*cd564c6bSJustin Lebartarget triple = "nvptx64-nvidia-cuda"
4*cd564c6bSJustin Lebar
5*cd564c6bSJustin Lebar; Check that the load-store vectorizer is enabled by default for nvptx, and
6*cd564c6bSJustin Lebar; that it's disabled by the appropriate flag.
7*cd564c6bSJustin Lebar
8*cd564c6bSJustin Lebar; ENABLED: ld.v2.{{.}}32
9*cd564c6bSJustin Lebar; DISABLED: ld.{{.}}32
10*cd564c6bSJustin Lebar; DISABLED: ld.{{.}}32
11*cd564c6bSJustin Lebardefine i32 @f(i32* %p) {
12*cd564c6bSJustin Lebar  %p.1 = getelementptr i32, i32* %p, i32 1
13*cd564c6bSJustin Lebar  %v0 = load i32, i32* %p, align 8
14*cd564c6bSJustin Lebar  %v1 = load i32, i32* %p.1, align 4
15*cd564c6bSJustin Lebar  %sum = add i32 %v0, %v1
16*cd564c6bSJustin Lebar  ret i32 %sum
17*cd564c6bSJustin Lebar}
18