llvm.org GIT mirror llvm / c95d327
[NVPTX] Add 'b' asm constraint git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211946 91177308-0d34-0410-b5e6-96231b3b80d8 Justin Holewinski 6 years ago
2 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
26042604 switch (Constraint[0]) {
26052605 default:
26062606 break;
2607 case 'b':
26072608 case 'r':
26082609 case 'h':
26092610 case 'c':
26232624 MVT VT) const {
26242625 if (Constraint.size() == 1) {
26252626 switch (Constraint[0]) {
2627 case 'b':
2628 return std::make_pair(0U, &NVPTX::Int1RegsRegClass);
26262629 case 'c':
26272630 return std::make_pair(0U, &NVPTX::Int16RegsRegClass);
26282631 case 'h':
66 %0 = call float asm "ex2.approx.ftz.f32 $0, $1;", "=f,f"(float %x)
77 ret float %0
88 }
9
10 define i32 @foo(i1 signext %cond, i32 %a, i32 %b) #0 {
11 entry:
12 ; CHECK: selp.b32 %r{{[0-9]+}}, %r{{[0-9]+}}, %r{{[0-9]+}}, %p{{[0-9]+}}
13 %0 = tail call i32 asm "selp.b32 $0, $1, $2, $3;", "=r,r,r,b"(i32 %a, i32 %b, i1 %cond)
14 ret i32 %0
15 }