[PATCH] D37231: Add half load and store builtins

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 1 09:41:47 PDT 2017


Anastasia added inline comments.


================
Comment at: test/CodeGenOpenCL/no-half.cl:19
+	__builtin_store_half(foo, bar);
+// CHECK: [[HALF_VAL:%.*]] = fptrunc double %foo to half
+// CHECK: store half [[HALF_VAL]], half addrspace({{.}})* %bar, align 2
----------------
Would it make sense to add a check for `load` similarly to `store` in the test_load_float/test_load_double tests?


================
Comment at: test/CodeGenOpenCL/no-half.cl:27
+	foo[0] = __builtin_load_halff(bar);
+// CHECK: [[HALF_VAL:%.*]] = load
+// CHECK: [[FULL_VAL:%.*]] = fpext half [[HALF_VAL]] to float
----------------
Minor thing: any reason you are not checking the load fully?


Repository:
  rL LLVM

https://reviews.llvm.org/D37231





More information about the cfe-commits mailing list