-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
480 additions
and
283 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,32 +1,39 @@ | ||
// RUN: %clang_cc1 -triple s390x-linux-gnu -emit-llvm -o - %s \ | ||
// RUN: | FileCheck %s | ||
|
||
__fp16 f(__fp16 a, __fp16 b, __fp16 c, __fp16 d) { | ||
return a * b + c * d; | ||
void f(__fp16 *a, __fp16 *b, __fp16 *c, __fp16 *d, __fp16 *e) { | ||
*e = (*a) * (*b) + (*c) * (*d); | ||
} | ||
|
||
// CHECK-LABEL: define dso_local half @f(half noundef %a, half noundef %b, half noundef %c, half noundef %d) #0 { | ||
// CHECK-LABEL: define dso_local void @f(ptr noundef %a, ptr noundef %b, ptr noundef %c, ptr noundef %d, ptr noundef %e) #0 { | ||
// CHECK-NEXT: entry: | ||
// CHECK-NEXT: %a.addr = alloca half, align 2 | ||
// CHECK-NEXT: %b.addr = alloca half, align 2 | ||
// CHECK-NEXT: %c.addr = alloca half, align 2 | ||
// CHECK-NEXT: %d.addr = alloca half, align 2 | ||
// CHECK-NEXT: store half %a, ptr %a.addr, align 2 | ||
// CHECK-NEXT: store half %b, ptr %b.addr, align 2 | ||
// CHECK-NEXT: store half %c, ptr %c.addr, align 2 | ||
// CHECK-NEXT: store half %d, ptr %d.addr, align 2 | ||
// CHECK-NEXT: %0 = load half, ptr %a.addr, align 2 | ||
// CHECK-NEXT: %conv = fpext half %0 to float | ||
// CHECK-NEXT: %1 = load half, ptr %b.addr, align 2 | ||
// CHECK-NEXT: %conv1 = fpext half %1 to float | ||
// CHECK-NEXT: %a.addr = alloca ptr, align 8 | ||
// CHECK-NEXT: %b.addr = alloca ptr, align 8 | ||
// CHECK-NEXT: %c.addr = alloca ptr, align 8 | ||
// CHECK-NEXT: %d.addr = alloca ptr, align 8 | ||
// CHECK-NEXT: %e.addr = alloca ptr, align 8 | ||
// CHECK-NEXT: store ptr %a, ptr %a.addr, align 8 | ||
// CHECK-NEXT: store ptr %b, ptr %b.addr, align 8 | ||
// CHECK-NEXT: store ptr %c, ptr %c.addr, align 8 | ||
// CHECK-NEXT: store ptr %d, ptr %d.addr, align 8 | ||
// CHECK-NEXT: store ptr %e, ptr %e.addr, align 8 | ||
// CHECK-NEXT: %0 = load ptr, ptr %a.addr, align 8 | ||
// CHECK-NEXT: %1 = load half, ptr %0, align 2 | ||
// CHECK-NEXT: %conv = fpext half %1 to float | ||
// CHECK-NEXT: %2 = load ptr, ptr %b.addr, align 8 | ||
// CHECK-NEXT: %3 = load half, ptr %2, align 2 | ||
// CHECK-NEXT: %conv1 = fpext half %3 to float | ||
// CHECK-NEXT: %mul = fmul float %conv, %conv1 | ||
// CHECK-NEXT: %2 = load half, ptr %c.addr, align 2 | ||
// CHECK-NEXT: %conv2 = fpext half %2 to float | ||
// CHECK-NEXT: %3 = load half, ptr %d.addr, align 2 | ||
// CHECK-NEXT: %conv3 = fpext half %3 to float | ||
// CHECK-NEXT: %4 = load ptr, ptr %c.addr, align 8 | ||
// CHECK-NEXT: %5 = load half, ptr %4, align 2 | ||
// CHECK-NEXT: %conv2 = fpext half %5 to float | ||
// CHECK-NEXT: %6 = load ptr, ptr %d.addr, align 8 | ||
// CHECK-NEXT: %7 = load half, ptr %6, align 2 | ||
// CHECK-NEXT: %conv3 = fpext half %7 to float | ||
// CHECK-NEXT: %mul4 = fmul float %conv2, %conv3 | ||
// CHECK-NEXT: %add = fadd float %mul, %mul4 | ||
// CHECK-NEXT: %4 = fptrunc float %add to half | ||
// CHECK-NEXT: ret half %4 | ||
// CHECK-NEXT: %8 = fptrunc float %add to half | ||
// CHECK-NEXT: %9 = load ptr, ptr %e.addr, align 8 | ||
// CHECK-NEXT: store half %8, ptr %9, align 2 | ||
// CHECK-NEXT: ret void | ||
// CHECK-NEXT: } | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.