Skip to content

Commit 9538367

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: 5361ed8: Copy all required data from shadow memory
This change is to copy all data from shadow memory to the global memory.
1 parent e98892d commit 9538367

File tree

1 file changed

+39
-67
lines changed

1 file changed

+39
-67
lines changed

IGC/AdaptorCommon/RayTracing/AutoGenRTStackAccessPrivateOS.h

Lines changed: 39 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,32 +1631,32 @@ void _copyMemHitInProceed_Xe(Value* arg_0, Value* arg_1, Value* arg_2)
16311631
auto* BB_5 = BasicBlock::Create(*Ctx.getLLVMContext(), VALUE_NAME("_copyMemHitInProceed_Xe."), _JoinBB->getParent(), _JoinBB);
16321632
auto* BB_6 = BasicBlock::Create(*Ctx.getLLVMContext(), VALUE_NAME("_copyMemHitInProceed_Xe."), _JoinBB->getParent(), _JoinBB);
16331633
SetInsertPoint(BB_3);
1634-
auto* V_7 = CreateBitCast(arg_1, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
16351634
CreateCondBr(arg_2, BB_4, BB_5);
16361635
SetInsertPoint(BB_4);
1637-
auto* V_8 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(0), getInt32(3) });
1638-
auto* V_9 = CreateLoad(getInt32Ty(), V_8);
1639-
auto* V_10 = CreateInsertElement(ConstantVector::get({ getInt32(0), getInt32(0), getInt32(0), UndefValue::get(getInt32Ty()), getInt32(0), getInt32(0), getInt32(0), getInt32(0) }), V_9, getInt64(3));
1640-
auto* V_11 = CreateBitCast(arg_0, PointerType::get(IGCLLVM::FixedVectorType::get(getInt32Ty(), 8), arg_0->getType()->getPointerAddressSpace()));
1641-
CreateStore(V_10, V_11);
1642-
auto* V_12 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(1) });
1643-
auto* V_13 = CreateBitCast(V_12, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
1644-
auto* V_14 = CreateLoad(getInt32Ty(), V_13);
1645-
auto* V_15 = CreateInsertElement(ConstantVector::get({ UndefValue::get(getInt32Ty()), getInt32(0), getInt32(0), UndefValue::get(getInt32Ty()), getInt32(0), getInt32(0), getInt32(0), getInt32(0) }), V_14, getInt64(0));
1636+
auto* V_7 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(0), getInt32(3) });
1637+
auto* V_8 = CreateLoad(getInt32Ty(), V_7);
1638+
auto* V_9 = CreateInsertElement(ConstantVector::get({ getInt32(0), getInt32(0), getInt32(0), UndefValue::get(getInt32Ty()) }), V_8, getInt64(3));
1639+
auto* V_10 = CreateBitCast(arg_0, PointerType::get(IGCLLVM::FixedVectorType::get(getInt32Ty(), 4), arg_0->getType()->getPointerAddressSpace()));
1640+
CreateStore(V_9, V_10);
1641+
auto* V_11 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(1) });
1642+
auto* V_12 = CreateBitCast(V_11, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
1643+
auto* V_13 = CreateLoad(getInt32Ty(), V_12);
1644+
auto* V_14 = CreateInsertElement(ConstantVector::get({ UndefValue::get(getInt32Ty()), getInt32(0), getInt32(0), UndefValue::get(getInt32Ty()) }), V_13, getInt64(0));
16461645
CreateBr(BB_6);
16471646
SetInsertPoint(BB_6);
1648-
auto* V_16 = CreatePHI(IGCLLVM::FixedVectorType::get(getInt32Ty(), 8), 2);
1649-
auto* V_17 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(1), getInt32(3) });
1650-
auto* V_18 = CreateLoad(getInt32Ty(), V_17);
1651-
auto* V_19 = CreateOr(V_18, getInt32(268435456));
1652-
auto* V_20 = CreateInsertElement(V_16, V_19, getInt64(3));
1653-
auto* V_21 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_0, { getInt64(0), getInt32(1) });
1654-
auto* V_22 = CreateBitCast(V_21, PointerType::get(IGCLLVM::FixedVectorType::get(getInt32Ty(), 8), arg_0->getType()->getPointerAddressSpace()));
1655-
CreateStore(V_20, V_22);
1647+
auto* V_15 = CreatePHI(IGCLLVM::FixedVectorType::get(getInt32Ty(), 4), 2);
1648+
auto* V_16 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(1), getInt32(3) });
1649+
auto* V_17 = CreateLoad(getInt32Ty(), V_16);
1650+
auto* V_18 = CreateOr(V_17, getInt32(268435456));
1651+
auto* V_19 = CreateInsertElement(V_15, V_18, getInt64(3));
1652+
auto* V_20 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_0, { getInt64(0), getInt32(1) });
1653+
auto* V_21 = CreateBitCast(V_20, PointerType::get(IGCLLVM::FixedVectorType::get(getInt32Ty(), 4), arg_0->getType()->getPointerAddressSpace()));
1654+
CreateStore(V_19, V_21);
16561655
CreateBr(_JoinBB);
16571656
SetInsertPoint(BB_5);
1658-
auto* V_23 = CreateLoad(getInt32Ty(), V_7);
1659-
auto* V_24 = CreateInsertElement(UndefValue::get(IGCLLVM::FixedVectorType::get(getInt32Ty(), 8)), V_23, getInt64(0));
1657+
auto* V_22 = CreateBitCast(arg_1, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
1658+
auto* V_23 = CreateLoad(getInt32Ty(), V_22);
1659+
auto* V_24 = CreateInsertElement(UndefValue::get(IGCLLVM::FixedVectorType::get(getInt32Ty(), 4)), V_23, getInt64(0));
16601660
auto* V_25 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(0), getInt32(1) });
16611661
auto* V_26 = CreateBitCast(V_25, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
16621662
auto* V_27 = CreateLoad(getInt32Ty(), V_26);
@@ -1665,54 +1665,26 @@ void _copyMemHitInProceed_Xe(Value* arg_0, Value* arg_1, Value* arg_2)
16651665
auto* V_30 = CreateBitCast(V_29, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
16661666
auto* V_31 = CreateLoad(getInt32Ty(), V_30);
16671667
auto* V_32 = CreateInsertElement(V_28, V_31, getInt64(2));
1668-
auto* V_33 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(0), getInt32(4) });
1669-
auto* V_34 = CreateBitCast(V_33, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
1670-
auto* V_35 = CreateLoad(getInt32Ty(), V_34);
1671-
auto* V_36 = CreateInsertElement(V_32, V_35, getInt64(4));
1672-
auto* V_37 = CreateInBoundsGEP(getInt32Ty(), V_7, getInt64(5));
1673-
auto* V_38 = CreateLoad(getInt32Ty(), V_37);
1674-
auto* V_39 = CreateInsertElement(V_36, V_38, getInt64(5));
1675-
auto* V_40 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(0), getInt32(5) });
1676-
auto* V_41 = CreateBitCast(V_40, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
1677-
auto* V_42 = CreateLoad(getInt32Ty(), V_41);
1678-
auto* V_43 = CreateInsertElement(V_39, V_42, getInt64(6));
1679-
auto* V_44 = CreateInBoundsGEP(getInt32Ty(), V_7, getInt64(7));
1680-
auto* V_45 = CreateLoad(getInt32Ty(), V_44);
1681-
auto* V_46 = CreateInsertElement(V_43, V_45, getInt64(7));
1682-
auto* V_47 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(0), getInt32(3) });
1683-
auto* V_48 = CreateLoad(getInt32Ty(), V_47);
1684-
auto* V_49 = CreateInsertElement(V_46, V_48, getInt64(3));
1685-
auto* V_50 = CreateBitCast(arg_0, PointerType::get(IGCLLVM::FixedVectorType::get(getInt32Ty(), 8), arg_0->getType()->getPointerAddressSpace()));
1686-
CreateStore(V_49, V_50);
1687-
auto* V_51 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(1) });
1688-
auto* V_52 = CreateBitCast(V_51, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
1689-
auto* V_53 = CreateLoad(getInt32Ty(), V_52);
1690-
auto* V_54 = CreateInsertElement(UndefValue::get(IGCLLVM::FixedVectorType::get(getInt32Ty(), 8)), V_53, getInt64(0));
1691-
auto* V_55 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(1), getInt32(1) });
1692-
auto* V_56 = CreateBitCast(V_55, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
1693-
auto* V_57 = CreateLoad(getInt32Ty(), V_56);
1694-
auto* V_58 = CreateInsertElement(V_54, V_57, getInt64(1));
1695-
auto* V_59 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(1), getInt32(2) });
1696-
auto* V_60 = CreateBitCast(V_59, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
1697-
auto* V_61 = CreateLoad(getInt32Ty(), V_60);
1698-
auto* V_62 = CreateInsertElement(V_58, V_61, getInt64(2));
1699-
auto* V_63 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(1), getInt32(4) });
1700-
auto* V_64 = CreateBitCast(V_63, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
1701-
auto* V_65 = CreateLoad(getInt32Ty(), V_64);
1702-
auto* V_66 = CreateInsertElement(V_62, V_65, getInt64(4));
1703-
auto* V_67 = CreateInBoundsGEP(getInt32Ty(), V_52, getInt64(5));
1704-
auto* V_68 = CreateLoad(getInt32Ty(), V_67);
1705-
auto* V_69 = CreateInsertElement(V_66, V_68, getInt64(5));
1706-
auto* V_70 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(1), getInt32(5) });
1707-
auto* V_71 = CreateBitCast(V_70, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
1708-
auto* V_72 = CreateLoad(getInt32Ty(), V_71);
1709-
auto* V_73 = CreateInsertElement(V_69, V_72, getInt64(6));
1710-
auto* V_74 = CreateInBoundsGEP(getInt32Ty(), V_52, getInt64(7));
1711-
auto* V_75 = CreateLoad(getInt32Ty(), V_74);
1712-
auto* V_76 = CreateInsertElement(V_73, V_75, getInt64(7));
1668+
auto* V_33 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(0), getInt32(3) });
1669+
auto* V_34 = CreateLoad(getInt32Ty(), V_33);
1670+
auto* V_35 = CreateInsertElement(V_32, V_34, getInt64(3));
1671+
auto* V_36 = CreateBitCast(arg_0, PointerType::get(IGCLLVM::FixedVectorType::get(getInt32Ty(), 4), arg_0->getType()->getPointerAddressSpace()));
1672+
CreateStore(V_35, V_36);
1673+
auto* V_37 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(1) });
1674+
auto* V_38 = CreateBitCast(V_37, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
1675+
auto* V_39 = CreateLoad(getInt32Ty(), V_38);
1676+
auto* V_40 = CreateInsertElement(UndefValue::get(IGCLLVM::FixedVectorType::get(getInt32Ty(), 4)), V_39, getInt64(0));
1677+
auto* V_41 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(1), getInt32(1) });
1678+
auto* V_42 = CreateBitCast(V_41, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
1679+
auto* V_43 = CreateLoad(getInt32Ty(), V_42);
1680+
auto* V_44 = CreateInsertElement(V_40, V_43, getInt64(1));
1681+
auto* V_45 = CreateInBoundsGEP(_struct_RTStackFormat__RTStack(*Ctx.getModule()), arg_1, { getInt64(0), getInt32(1), getInt32(2) });
1682+
auto* V_46 = CreateBitCast(V_45, PointerType::get(getInt32Ty(), arg_1->getType()->getPointerAddressSpace()));
1683+
auto* V_47 = CreateLoad(getInt32Ty(), V_46);
1684+
auto* V_48 = CreateInsertElement(V_44, V_47, getInt64(2));
17131685
CreateBr(BB_6);
1714-
V_16->addIncoming(V_15, BB_4);
1715-
V_16->addIncoming(V_76, BB_5);
1686+
V_15->addIncoming(V_14, BB_4);
1687+
V_15->addIncoming(V_48, BB_5);
17161688
SetInsertPoint(_CurIP);
17171689
}
17181690

0 commit comments

Comments
 (0)