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
Diff Detail
- Repository
- rL LLVM
Event Timeline
LGTM with a few nits.
../lib/CodeGen/CodeGenPrepare.cpp | ||
---|---|---|
1142 | "Shorten the way" -> "Short-cut" | |
1154 | You can load the first scalar with the original alignment, right? (Not that I'm sure it matters any) | |
1166 | 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 | Same as above. | |
1304 | Same as above. |
"Shorten the way" -> "Short-cut"