Note that if we need the result of both the divide and the modulo then we compute the modulo based on the result of the divide and not using the new hardware instruction.
Details
Diff Detail
Event Timeline
Aside from a few minor inline nits, LGTM. Please address the inline comments on the commit.
lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
207–223 | Sure. Technically. But I think the comment is fine. | |
8405 | Well, this isn't completely accurate. Probably more accurate to say something like | |
8406 | The temporary isn't really needed here. The loop can just be | |
test/CodeGen/PowerPC/ppc64-P9-mod.ll | ||
2 | Yes, I agree. The codegen (and therefore CHECK directives) don't need to change, but please add a RUN line with triple -mtriple=powerpc64-unknown-linux-gnu. | |
21 | For the actual MOD instructions you're checking for where the operands are parameters, please add the input registers to the CHECK directives since they're mandated by the ABI. They should look something like I don't think we care to do that for the checks of existing code though (i.e. the dif/mul/sub). |
nit: harware -> hardware