[llvm] [libc] [compiler-rt] [clang-tools-extra] [flang] [clang] [DirectX][docs] Architecture and design philosophy of DXIL support (PR #78221)

2024-01-31 Thread Brian Favela via cfe-commits
@@ -0,0 +1,102 @@ +=== +Architecture and Design of DXIL Support in LLVM +=== + +.. contents:: + :local: + +.. toctree:: + :hidden: + +Introduction + + +LLVM supports reading and

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread Brian Favela via cfe-commits
@@ -705,66 +705,74 @@ float4 cosh(float4); #ifdef __HLSL_ENABLE_16_BIT _HLSL_AVAILABILITY(shadermodel, 6.2) -_HLSL_BUILTIN_ALIAS(__builtin_elementwise_popcount) -int16_t countbits(int16_t); bfavela wrote: Ah, of course our documentation is wrong. countbits of

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread Brian Favela via cfe-commits
@@ -705,66 +705,74 @@ float4 cosh(float4); #ifdef __HLSL_ENABLE_16_BIT _HLSL_AVAILABILITY(shadermodel, 6.2) -_HLSL_BUILTIN_ALIAS(__builtin_elementwise_popcount) -int16_t countbits(int16_t); bfavela wrote: Sorry I missed the earlier PR where this was added, bu

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread Brian Favela via cfe-commits
@@ -461,6 +461,67 @@ class OpLowerer { }); } + [[nodiscard]] bool lowerCtpopToCBits(Function &F) { +IRBuilder<> &IRB = OpBuilder.getIRB(); +Type *Int32Ty = IRB.getInt32Ty(); + +return replaceFunction(F, [&](CallInst *CI) -> Error { + IRB.SetInsertPoint(

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread Brian Favela via cfe-commits
@@ -461,6 +461,67 @@ class OpLowerer { }); } + [[nodiscard]] bool lowerCtpopToCBits(Function &F) { +IRBuilder<> &IRB = OpBuilder.getIRB(); +Type *Int32Ty = IRB.getInt32Ty(); + +return replaceFunction(F, [&](CallInst *CI) -> Error { + IRB.SetInsertPoint(

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread Brian Favela via cfe-commits
@@ -461,6 +461,67 @@ class OpLowerer { }); } + [[nodiscard]] bool lowerCtpopToCBits(Function &F) { +IRBuilder<> &IRB = OpBuilder.getIRB(); +Type *Int32Ty = IRB.getInt32Ty(); + +return replaceFunction(F, [&](CallInst *CI) -> Error { + IRB.SetInsertPoint(

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread Brian Favela via cfe-commits
@@ -461,6 +461,67 @@ class OpLowerer { }); } + [[nodiscard]] bool lowerCtpopToCBits(Function &F) { +IRBuilder<> &IRB = OpBuilder.getIRB(); +Type *Int32Ty = IRB.getInt32Ty(); + +return replaceFunction(F, [&](CallInst *CI) -> Error { + IRB.SetInsertPoint(

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread Brian Favela via cfe-commits
@@ -461,6 +461,67 @@ class OpLowerer { }); } + [[nodiscard]] bool lowerCtpopToCBits(Function &F) { +IRBuilder<> &IRB = OpBuilder.getIRB(); +Type *Int32Ty = IRB.getInt32Ty(); + +return replaceFunction(F, [&](CallInst *CI) -> Error { + IRB.SetInsertPoint(

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread Brian Favela via cfe-commits
https://github.com/bfavela edited https://github.com/llvm/llvm-project/pull/113189 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-21 Thread Brian Favela via cfe-commits
@@ -44,4 +67,4 @@ entry: declare i16 @llvm.ctpop.i16(i16) declare i32 @llvm.ctpop.i32(i32) declare i64 @llvm.ctpop.i64(i64) -declare <4 x i32> @llvm.ctpop.v4i32(<4 x i32>) +declare <4 x i32> @llvm.ctpop.v4i32(<4 x i32>) bfavela wrote: Missing a newline at the