[llvm] [AMDGPU] Reject misaligned SGPR constraints for inline asm (PR #123590)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 03:37:59 PST 2025


================
@@ -15877,7 +15877,7 @@ SITargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI_,
             RC = TRI->getAGPRClassForBitWidth(Width);
           if (RC) {
             Reg = TRI->getMatchingSuperReg(Reg, AMDGPU::sub0, RC);
-            if (Reg == 0U) {
+            if (!Reg ) {
----------------
arsenm wrote:

```suggestion
            if (!Reg) {
```

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


More information about the llvm-commits mailing list