<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 7, 2016, at 11:03, Jan Vesely <<a href="mailto:jan.vesely@rutgers.edu" class="">jan.vesely@rutgers.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On Tue, 2016-12-06 at 11:05 -0800, Matt Arsenault wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class="">On Dec 6, 2016, at 11:04, Jan Vesely <<a href="mailto:jan.vesely@rutgers.edu" class="">jan.vesely@rutgers.edu</a>> wrote:<br class=""><br class="">On Tue, 2016-12-06 at 10:52 -0800, Matt Arsenault wrote:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">On Dec 5, 2016, at 12:42, Jan Vesely <<a href="mailto:jan.vesely@rutgers.edu" class="">jan.vesely@rutgers.edu</a>> wrote:<br class=""><br class="">On Mon, 2016-12-05 at 09:48 -0800, <a href="mailto:arsenm2@gmail.com" class="">arsenm2@gmail.com</a> <<a href="mailto:arsenm2@gmail.com" class="">mailto:arsenm2@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class="">From: Matt Arsenault <<a href="mailto:arsenm2@gmail.com" class="">arsenm2@gmail.com</a>><br class=""><br class="">---<br class="">.../execute/negative-private-base-pointer.cl       | 120 +++++++++++++++++++++<br class="">1 file changed, 120 insertions(+)<br class="">create mode 100644 tests/cl/program/execute/negative-private-base-pointer.cl<br class=""><br class="">diff --git a/tests/cl/program/execute/negative-private-base-pointer.cl b/tests/cl/program/execute/negative-private-base-pointer.cl<br class="">new file mode 100644<br class="">index 0000000..7ee528b<br class="">--- /dev/null<br class="">+++ b/tests/cl/program/execute/negative-private-base-pointer.cl<br class="">@@ -0,0 +1,120 @@<br class="">+/*!<br class="">+[config]<br class="">+name: negative private buffer base index<br class="">+clc_version_min: 10<br class="">+dimensions: 1<br class="">+<br class="">+[test]<br class="">+kernel_name: read_write_private_base_plus_offset<br class="">+name: negative base private index<br class="">+global_size: 1 0 0<br class="">+<br class="">+arg_out: 0 buffer int[16]  \<br class="">+  0xab       \<br class="">+  0xbc       \<br class="">+  0xabcd     \<br class="">+  0xdead     \<br class="">+             \<br class="">+  0xcafe     \<br class="">+  0xf00d     \<br class="">+  0xababfeed \<br class="">+  0xca00fe   \<br class="">+             \<br class="">+  0xb00feed  \<br class="">+  0xca00fe   \<br class="">+  0xfeedbeef \<br class="">+  0xfe       \<br class="">+             \<br class="">+  0xbe00fe   \<br class="">+  0xabcdef   \<br class="">+  0xbeef     \<br class="">+  0xde<br class="">+<br class="">+<br class="">+arg_in: 1 buffer int[16] \<br class="">+    -1 \<br class="">+    -1 \<br class="">+    -4 \<br class="">+    -4 \<br class="">+       \<br class="">+    -3 \<br class="">+    -4 \<br class="">+    -2 \<br class="">+  -115 \<br class="">+       \<br class="">+  -109 \<br class="">+ -1015 \<br class="">+ -1011 \<br class="">+ -1020 \<br class="">+       \<br class="">+ -1014 \<br class="">+  -137 \<br class="">+  -151 \<br class="">+   -40<br class="">+<br class="">+!*/<br class="">+<br class="">+#if 0<br class="">+  0xab   \<br class="">+  0xbc   \<br class="">+  0xf00d \<br class="">+  0xdead \<br class="">+  0xcafe \<br class="">+  0xabcd \<br class="">+  0xababfeed \<br class="">+  0xca00fe   \<br class="">+  0xb00feed  \<br class="">+  0xca00fe   \<br class="">+  0xfeedbeef \<br class="">+  0xfe       \<br class="">+  0xbe00fe   \<br class="">+  0xabcdef   \<br class="">+  0xbeef     \<br class="">+  0xde<br class="">+#endif<br class="">+<br class="">+kernel void read_write_private_base_plus_offset(global int* out, global int* in)<br class="">+{<br class="">+    volatile int alloca[16];<br class=""></blockquote><br class="">does this need to be volatile?<br class=""><br class="">other than that:<br class="">Reviewed-by: Jan Vesely <<a href="mailto:jan.vesely@rutgers.edu" class="">jan.vesely@rutgers.edu</a> <<a href="mailto:jan.vesely@rutgers.edu" class="">mailto:jan.vesely@rutgers.edu</a>>><br class=""><br class="">Jan<br class=""></blockquote><br class="">Yes, otherwise the private memory access will be trivially optimized<br class="">out defeating the point of the test<br class=""></blockquote><br class="">I don't get the trivial part. what would that be optimized to? the<br class="">indices are using values from input buffer (therefore unknown), so it<br class="">cannot directly match the constants to corresponding position in out<br class="">buffer.<br class=""><br class="">Jan<br class=""></blockquote><br class="">This could be replaced with a series of selects or hit the move to LDS optimization<span class="Apple-converted-space"> </span><br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">right, thanks. I didn't consider move to LDS.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">last question. what's the purpose of that #if 0 block?</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Jan</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote></div><br class=""><div class=""><br class=""></div><div class="">I think it was just other values I was going to test but then never finished them</div></body></html>