[clang] [CIR] Implement HLSL vector element lvalue scalar swizzles (PR #238425)
Amr Hesham via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 5 10:52:08 PST 2026
================
@@ -883,8 +862,11 @@ RValue CIRGenFunction::emitLoadOfExtVectorElementLValue(LValue lv) {
// IR value to a vector here allows the rest of codegen to behave as normal.
if (getLangOpts().HLSL &&
!mlir::isa<cir::VectorType, cir::MatrixType>(vec.getType())) {
- cgm.errorNYI(loc, "emitLoadOfExtVectorElementLValue: HLSL");
- return {};
+ auto dstTy = cir::VectorType::get(
+ vec.getType(), llvm::ElementCount::get(1, /*Scalable=*/false));
----------------
AmrDeveloper wrote:
Thanks, I will create NFC to update to make it consistent
https://github.com/llvm/llvm-project/pull/238425
More information about the cfe-commits
mailing list