OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 8917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8928 const HConstant* c1 = HConstant::cast(sa); | 8928 const HConstant* c1 = HConstant::cast(sa); |
8929 const HConstant* c2 = HConstant::cast(const32_minus_sa); | 8929 const HConstant* c2 = HConstant::cast(const32_minus_sa); |
8930 return c1->HasInteger32Value() && c2->HasInteger32Value() && | 8930 return c1->HasInteger32Value() && c2->HasInteger32Value() && |
8931 (c1->Integer32Value() + c2->Integer32Value() == 32); | 8931 (c1->Integer32Value() + c2->Integer32Value() == 32); |
8932 } | 8932 } |
8933 if (!const32_minus_sa->IsSub()) return false; | 8933 if (!const32_minus_sa->IsSub()) return false; |
8934 HSub* sub = HSub::cast(const32_minus_sa); | 8934 HSub* sub = HSub::cast(const32_minus_sa); |
8935 if (sa != sub->right()) return false; | 8935 if (sa != sub->right()) return false; |
8936 HValue* const32 = sub->left(); | 8936 HValue* const32 = sub->left(); |
8937 if (!const32->IsConstant() || | 8937 if (!const32->IsConstant() || |
8938 !HConstant::cast(const32)->HasInteger32Value() || | |
8938 HConstant::cast(const32)->Integer32Value() != 32) { | 8939 HConstant::cast(const32)->Integer32Value() != 32) { |
Sven Panne
2014/03/13 09:36:40
Simplify this brain teaser to
return sub->left()-
| |
8939 return false; | 8940 return false; |
8940 } | 8941 } |
8941 return (sub->right() == sa); | 8942 return (sub->right() == sa); |
8942 } | 8943 } |
8943 | 8944 |
8944 | 8945 |
8945 // Checks if the left and the right are shift instructions with the oposite | 8946 // Checks if the left and the right are shift instructions with the oposite |
8946 // directions that can be replaced by one rotate right instruction or not. | 8947 // directions that can be replaced by one rotate right instruction or not. |
8947 // Returns the operand and the shift amount for the rotate instruction in the | 8948 // Returns the operand and the shift amount for the rotate instruction in the |
8948 // former case. | 8949 // former case. |
(...skipping 2349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
11298 if (ShouldProduceTraceOutput()) { | 11299 if (ShouldProduceTraceOutput()) { |
11299 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11300 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11300 } | 11301 } |
11301 | 11302 |
11302 #ifdef DEBUG | 11303 #ifdef DEBUG |
11303 graph_->Verify(false); // No full verify. | 11304 graph_->Verify(false); // No full verify. |
11304 #endif | 11305 #endif |
11305 } | 11306 } |
11306 | 11307 |
11307 } } // namespace v8::internal | 11308 } } // namespace v8::internal |
OLD | NEW |