From 29b5b9816bcc439440b22c2bf9f075f64a0acecd Mon Sep 17 00:00:00 2001
From: Tom Stellard <thomas.stellard@amd.com>
Date: Wed, 26 Jun 2013 18:21:31 +0000
Subject: [PATCH] libclc: Rename [add|sub]_sat.ll to [add|sub]_sat_if.ll

configure.py allows overloading *.cl with *.ll, but will only ever build
the first file listed in SOURCES of ${file}.cl and ${file}.ll

add_sat, sub_sat, (and the soon to be submitted clz) all define interfaces in
${function_name}.ll which are implemented in ${function_name}_impl.ll.

Renaming the interface files is enough to get them to build again, fixing
CL usage of these functions.

Tested on clover/r600g.

Patch by: Aaron Watry

llvm-svn: 185000
---
 libclc/generic/lib/SOURCES                               | 4 ++--
 libclc/generic/lib/integer/{add_sat.ll => add_sat_if.ll} | 0
 libclc/generic/lib/integer/{sub_sat.ll => sub_sat_if.ll} | 0
 libclc/ptx/lib/OVERRIDES                                 | 2 ++
 4 files changed, 4 insertions(+), 2 deletions(-)
 rename libclc/generic/lib/integer/{add_sat.ll => add_sat_if.ll} (100%)
 rename libclc/generic/lib/integer/{sub_sat.ll => sub_sat_if.ll} (100%)
 create mode 100644 libclc/ptx/lib/OVERRIDES

diff --git a/libclc/generic/lib/SOURCES b/libclc/generic/lib/SOURCES
index 495b3e7696c0..7f27ec4ae0e7 100644
--- a/libclc/generic/lib/SOURCES
+++ b/libclc/generic/lib/SOURCES
@@ -6,11 +6,11 @@ geometric/normalize.cl
 integer/abs.cl
 integer/abs_diff.cl
 integer/add_sat.cl
-integer/add_sat.ll
+integer/add_sat_if.ll
 integer/add_sat_impl.ll
 integer/rotate.cl
 integer/sub_sat.cl
-integer/sub_sat.ll
+integer/sub_sat_if.ll
 integer/sub_sat_impl.ll
 math/fmax.cl
 math/fmin.cl
diff --git a/libclc/generic/lib/integer/add_sat.ll b/libclc/generic/lib/integer/add_sat_if.ll
similarity index 100%
rename from libclc/generic/lib/integer/add_sat.ll
rename to libclc/generic/lib/integer/add_sat_if.ll
diff --git a/libclc/generic/lib/integer/sub_sat.ll b/libclc/generic/lib/integer/sub_sat_if.ll
similarity index 100%
rename from libclc/generic/lib/integer/sub_sat.ll
rename to libclc/generic/lib/integer/sub_sat_if.ll
diff --git a/libclc/ptx/lib/OVERRIDES b/libclc/ptx/lib/OVERRIDES
new file mode 100644
index 000000000000..475162c97cd2
--- /dev/null
+++ b/libclc/ptx/lib/OVERRIDES
@@ -0,0 +1,2 @@
+integer/add_sat_if.ll
+integer/sub_sat_if.ll