[llvm] GlobalISel lane masks merging (PR #73337)

Petar Avramovic via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 06:35:25 PST 2023


================
@@ -415,19 +411,19 @@ FunctionPass *llvm::createSILowerI1CopiesPass() {
   return new SILowerI1Copies();
 }
 
-static unsigned createLaneMaskReg(MachineFunction &MF) {
-  const GCNSubtarget &ST = MF.getSubtarget<GCNSubtarget>();
-  MachineRegisterInfo &MRI = MF.getRegInfo();
-  return MRI.createVirtualRegister(ST.isWave32() ? &AMDGPU::SReg_32RegClass
-                                                 : &AMDGPU::SReg_64RegClass);
+Register llvm::createLaneMaskReg(MachineRegisterInfo *MRI,
+                                 Register *LaneMaskRegAttrs) {
----------------
petar-avramovic wrote:

The general idea was to crash if Register *LaneMaskRegAttrs was not initialized, it might not be that obvious if uninitialized Register(0) was used and bad code was generated.

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


More information about the llvm-commits mailing list