[PATCH] D33916: RenameIndependentSubregs: Fix handling of undef tied operands
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 5 15:26:46 PDT 2017
MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.
Good catch, LGTM.
================
Comment at: lib/CodeGen/RenameIndependentSubregs.cpp:246-247
MO.setReg(VReg);
+ if (MO.isTied())
+ MO.getParent()->substituteRegister(Reg, VReg, 0, TRI);
}
----------------
Could you add a comment along the lines of ```
/// Undef use operands are not tracked in the equivalence class but need to be update if they are tied.
```
================
Comment at: test/CodeGen/AMDGPU/rename-independent-subregs-invalid-mac-operands.mir:2-23
+--- |
+ define amdgpu_kernel void @mac_invalid_operands(float %arg) #0 {
+ bb:
+ %tmp = fcmp oeq float %arg, 0.000000e+00
+ br i1 %tmp, label %bb1, label %bb6
+
+ bb1: ; preds = %bb
----------------
Do you actually need the IR, see also: http://llvm.org/docs/MIRLangRef.html#simplifying-mir-files
https://reviews.llvm.org/D33916
More information about the llvm-commits
mailing list