[clang] [llvm] [SPIRV] Add PreLegalizer instCombine for `faceforward` (PR #139959)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Wed May 14 14:32:41 PDT 2025


================
@@ -127,11 +127,7 @@ template <typename T> constexpr vector<T, 4> lit_impl(T NDotL, T NDotH, T M) {
 }
 
 template <typename T> constexpr T faceforward_impl(T N, T I, T Ng) {
-#if (__has_builtin(__builtin_spirv_faceforward))
-  return __builtin_spirv_faceforward(N, I, Ng);
-#else
   return select(dot(I, Ng) < 0, N, -N);
-#endif
 }
----------------
arsenm wrote:

Should not be done in this patch 

https://github.com/llvm/llvm-project/pull/139959


More information about the cfe-commits mailing list