-
Notifications
You must be signed in to change notification settings - Fork 304
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
1 parent
c2d80a6
commit 0f2b9fa
Showing
11 changed files
with
119 additions
and
36 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
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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// RUN: %{ispc} --target=host --nostdlib --nowrap %s -o - --emit-llvm-text 2>&1 | FileCheck %s | ||
// RUN: %{ispc} --target=host --nostdlib --nowrap %s -o - --emit-llvm-text --mcmodel=small 2>&1 | FileCheck %s | ||
// RUN: %{ispc} --target=host --nostdlib --nowrap %s -o - --emit-llvm-text --mcmodel=large 2>&1 | FileCheck %s | ||
|
||
// XFAIL: * | ||
|
||
// TODO: | ||
// There is a strange behavior in the current PIC handling. When --pic | ||
// omitted LLVM IR contains "PIC Level", i32 2 but TargetMachine object is not | ||
// initialized with relocModel = PIC_. It looks wrong and should be fixed but | ||
// preserve this behavior for now. | ||
// This especially strange considering that --mcmodel=large|small affects the | ||
// PIC Level when --pic is omitted. | ||
|
||
// CHECK: !"PIC Level", i32 0 | ||
uniform int global_var = 42; | ||
|
||
uniform int foo() { return global_var; } |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// RUN: %{ispc} --target-os=ps4 --nostdlib --nowrap %s -o - --emit-llvm-text 2>&1 | FileCheck %s --check-prefix=CHECK-IR-PIC | ||
// RUN: %{ispc} --target-os=ps4 --nostdlib --nowrap %s -o - --emit-llvm-text --pic 2>&1 | FileCheck %s --check-prefix=CHECK-IR-PIC | ||
// RUN: %{ispc} --target-os=ps4 --nostdlib --nowrap %s -o - --emit-llvm-text --PIC 2>&1 | FileCheck %s --check-prefix=CHECK-IR-PIC | ||
|
||
// REQUIRES: PS_ENABLED | ||
|
||
// CHECK-IR-PIC: !"PIC Level", i32 2 | ||
|
||
uniform int global_var; | ||
|
||
uniform int foo() { return global_var; } |