Files
clang-p2996/llvm/test/CodeGen/NVPTX/boolean-patterns.ll
Fangrui Song b279f6b098 [NVPTX,test] Change llc -march= to -mtriple=
Similar to 806761a762

-mtriple= specifies the full target triple while -march= merely sets the
architecture part of the default target triple (e.g. Windows, macOS),
leaving a target triple which may not make sense.

Therefore, -march= is error-prone and not recommended for tests without
a target triple. The issue has been benign as we recognize
nvptx{,64}-apple-darwin as ELF instead of rejecting it outrightly.
2024-12-15 10:45:11 -08:00

34 lines
793 B
LLVM

; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_20 | FileCheck %s
; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 | %ptxas-verify %}
; CHECK-LABEL: m2and_rr
define i1 @m2and_rr(i1 %a, i1 %b) {
; CHECK: and.pred %p{{[0-9]+}}, %p{{[0-9]+}}, %p{{[0-9]+}}
; CHECK-NOT: mul
%r = mul i1 %a, %b
ret i1 %r
}
; CHECK-LABEL: m2and_ri
define i1 @m2and_ri(i1 %a) {
; CHECK-NOT: mul
%r = mul i1 %a, 1
ret i1 %r
}
; CHECK-LABEL: select2or
define i1 @select2or(i1 %a, i1 %b) {
; CHECK: or.b16 %rs{{[0-9]+}}, %rs{{[0-9]+}}, %rs{{[0-9]+}}
; CHECK-NOT: selp
%r = select i1 %a, i1 1, i1 %b
ret i1 %r
}
; CHECK-LABEL: select2and
define i1 @select2and(i1 %a, i1 %b) {
; CHECK: and.b16 %rs{{[0-9]+}}, %rs{{[0-9]+}}, %rs{{[0-9]+}}
; CHECK-NOT: selp
%r = select i1 %a, i1 %b, i1 0
ret i1 %r
}