This patch is in a series of patches to provide builtins for
compatability with the XL compiler. This patch adds builtins for compare
exponent and test data class operations on floating point values.
nemanjai stefanp lei
- Group Reviewers
- rG70391b3468b8: [PowerPC] FP compare and test XL compat builtins.
|100 ms||x64 debian > ORC-x86_64-linux.TestCases/Linux/x86-64::trivial-cxa-atexit.S|
Script: -- : 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang -m64 -c -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/orc/X86_64LinuxConfig/TestCases/Linux/x86-64/Output/trivial-cxa-atexit.S.tmp /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-cxa-atexit.S
|100 ms||x64 debian > ORC-x86_64-linux.TestCases/Linux/x86-64::trivial-static-initializer.S|
Script: -- : 'RUN: at line 7'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang -m64 -c -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/orc/X86_64LinuxConfig/TestCases/Linux/x86-64/Output/trivial-static-initializer.S.tmp /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-static-initializer.S
|90 ms||x64 debian > ORC-x86_64-linux.TestCases/Linux/x86-64::trivial-tls.S|
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang -m64 -c -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/orc/X86_64LinuxConfig/TestCases/Linux/x86-64/Output/trivial-tls.S.tmp /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-tls.S
I don't think this need to be function in the Sema class. It can just be a static function.
I think it'll be more clear if you move ppc_test_data-* handling out of this case stmt and move them into their own since they don't use the same CmprOpc or Op[1|2] as the other instrinsics.
This is a great suggestion, I'm wondering if the function is even needed at all though since the code block is quite small and only called once, having it inside the case statement seems more readable to me.
|12680 ↗||(On Diff #374312)|
need to remove.
ArgValue is only used one so not needed.
llvm::Type *ArgType = EmitScalarExpr(E->getArg(0))->getType();
variables should be discriptive of what they represent. This is no diff then a single char variable 🙂
braces here are redundant.
Try to refrain from def one-time use variables.
return Builder.CreateCall(CGM.getIntrinsic(Int), Ops, "test_data_class");
I'm not sure this is needed... can't we just return true here since this is a S error?
I dont' think this is needed since you will only be here if he IntrinsicID matches the lines listed prior to this block.
one time used variables can be removed.
this can just be an if/else since you won't be in this block unless the IntrisicID are ppc_test_data_class_[d|f]
unsigned CmprOpc = PPC::XSTSTDCDP; if (IntrinsicID == Intrinsic::ppc_test_data_class_f) CmprOpc = PPC::XSTSTDCSP;
one-time use variable. Can be merged into the call below.