When the target is unable to handle masked load/store intrinsic, we convert the intrinsic to scalar code. I added optimization for constant mask.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with a few nits.
| ../lib/CodeGen/CodeGenPrepare.cpp | ||
|---|---|---|
| 1142 ↗ | (On Diff #37718) | "Shorten the way" -> "Short-cut" | 
| 1154 ↗ | (On Diff #37718) | You can load the first scalar with the original alignment, right? (Not that I'm sure it matters any) | 
| 1166 ↗ | (On Diff #37718) | Why do you need the temp variable? I think it's just as clear with "if (isa<ConstantVector>Mask)) { ..." And then use ConstMask in both lines 1167 and 1169. | 
| 1286 ↗ | (On Diff #37718) | Same as above. | 
| 1304 ↗ | (On Diff #37718) | Same as above. |