This adds the umin, umax, smin, smax and abs intrinsics specified in D81829. The ISD opcodes and all the legalization and lowering already exist, so this just wires them up to the intrinsic in the SDAG builder and adds rudimentary tests.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
@RKSimon I've linked the corresponding LangRef patch as a parent now.
@lebedev.ri Feel free to take over if you prefer :) I'd like the intrinsics landed ASAP so everyone can start working on the long list of necessary pass integrations in parallel. It wasn't obvious to me that the last month of inactivity was due to branching and not just a lack of time.
Comment Actions
Should also handle GlobalISel. The effort part for min/max should be done already, but I think abs is missing
Comment Actions
LGTM. I haven't looked at GlobalISel much, so may want to get a 2nd opinion on that part.
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | ||
---|---|---|
1497–1507 | The IRTranslator should not expand operations. This should add a G_ABS opcode and move this to LegalizerHelper |
The IRTranslator should not expand operations. This should add a G_ABS opcode and move this to LegalizerHelper