[PATCH] D72189: [SystemZ] Support -msoft-float
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 31 05:32:39 PST 2020
uweigand added a comment.
In D72189#1850468 <https://reviews.llvm.org/D72189#1850468>, @jonpa wrote:
> > Ah, I see. But note that you're now not supporting "use-soft-float" at all (which I think is fine at this step!), so you should update all tests to no longer use "use-soft-float".
>
> Done.
> All llc invocations use -mattr=soft-float instead of relying on the function attributes, as must be done.
Ok, good.
> Addded a new test systemz-float-02.c to check that -msoft-float actually works all the way to assembly output. The type v4si using vector_size() gives a different output compared to gcc, so I guess this is implementation defined?
What's the difference in assembler? Could this be because you've implemented the VectorABI check the wrong way around? (If soft-float, then we have *no* VectorABI!)
================
Comment at: clang/lib/Basic/Targets/SystemZ.h:122
// If we use the vector ABI, vector types are 64-bit aligned.
- if (HasVector) {
+ if (HasVector || SoftFloat) {
MaxVectorAlign = 64;
----------------
Eh, I guess that should be "HasVector && !SoftFloat".
================
Comment at: llvm/lib/Target/SystemZ/SystemZISelLowering.cpp:1176
}
if (Constraint[1] == 'v') {
if (VT == MVT::f32)
----------------
This should have "&& Subtarget.hasVector()" here. Shouldn't that fix the problem with {v}?
If it does not, I agree this can wait for another patch.
================
Comment at: llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp:57
+ if (FS.contains("+soft-float"))
+ VectorABI = true;
+
----------------
No, VectorABI = false then.
Also, should you look for "soft-float" and "-soft-float", just as is done for "vector" above?
================
Comment at: llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp:199
if (getOptLevel() != CodeGenOpt::None) {
- addPass(createSystemZTDCPass());
+ if (!((SystemZTargetMachine*) TM)->getSubtargetImpl()->hasSoftFloat())
+ addPass(createSystemZTDCPass());
----------------
This can be just getTM<SystemZTargetMachine>() instead of the manual cast.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72189/new/
https://reviews.llvm.org/D72189
More information about the llvm-commits
mailing list