Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
AMD Government Intel The Courts News

AMD Alleges Intel Compilers Create Slower AMD Code 912

edxwelch writes "In AMD's recient anti-trust lawsuit AMD have examined the Intel compiler and found that it deliberatly runs code slower when it detects that the processor is an AMD. "To achieve this, Intel designed the compiler to compile code along several alternate code paths. ... By design, the code paths were not created equally. If the program detects a "Genuine Intel" microprocessor, it executes a fully optimized code path and operates with the maximum efficiency. However, if the program detects an "Authentic AMD" microprocessor, it executes a different code path that will degrade the program's performance or cause it to crash.""
This discussion has been archived. No new comments can be posted.

AMD Alleges Intel Compilers Create Slower AMD Code

Comments Filter:
  • Never (Score:2, Insightful)

    by Astroturf_Alert ( 898937 ) on Tuesday July 12, 2005 @11:42AM (#13042894) Homepage Journal
    ... attribute to malice that which can be fully explained by incompetence.

    - some great thinker I'm misquoting
  • by th1ckasabr1ck ( 752151 ) on Tuesday July 12, 2005 @11:43AM (#13042914)
    However, if the program detects an "Authentic AMD" microprocessor, it executes a different code path that will degrade the program's performance or cause it to crash.

    If that statement is true, wouldn't there be programs all over that ran fine on Intel but crashed on AMD? Maybe there are and I haven't noticed? Maybe not many people use Intel compilers?

  • by geneing ( 756949 ) on Tuesday July 12, 2005 @11:49AM (#13042987)
    Even if Intel compiler generated the same code independent of the processor, wouldn't code optimized for Intel processor be suboptimal on AMD?

    I thought that instruction timings, number of pipelines etc are different on amd, so code that's best for intel won't be best for amd.

  • by Anonymous Custard ( 587661 ) on Tuesday July 12, 2005 @11:50AM (#13043001) Homepage Journal
    Wow... that's a great example, and you should gather as much evidence of it as you can, especially Intel's responses, and send it to AMD's legal team.

    MOD PARENT UP
  • by curmudgeous ( 710771 ) on Tuesday July 12, 2005 @11:50AM (#13043014)
    IF AMD can find instances in the compiler of "if Intel then...else if AMD then..." they'll have a case. But this may just be an instance of Intel knowing best how to optimize for Intel processors.
  • by ylikone ( 589264 ) on Tuesday July 12, 2005 @11:51AM (#13043032) Homepage
    ...software. Something like this would never be implemented in an open source compiler. With open source, you know exactly what you get... with closed, you get what the owners want you to get, which will help their bottom line.
  • by Beatbyte ( 163694 ) on Tuesday July 12, 2005 @11:54AM (#13043076) Homepage
    They won't crash. They will use slower methods of moving and processing data.
  • by Len ( 89493 ) on Tuesday July 12, 2005 @11:56AM (#13043100)

    The code path that is super-optimized for Pentium 4 chips wouldn't be the best code for an Athlon chip anyway. For example, if the instructions are arranged to minimize pipeline stalls on a Pentium 4 (which I assume they would be if the code is "fully optimized"), that would not be the most optimal arrangement for running on an Athlon, which has a different internal design.

    So even if there was only one code path, it would be optimized more for Pentiums than for Athlons. One can't expect Intel to put lots of effort into optimizing for their competitor's products!

    However, that doesn't explain why there would be a separate code path for Athlons. They could just produce the one code path, which would work OK but not optimally for Athlons.

  • by Anonymous Coward on Tuesday July 12, 2005 @12:00PM (#13043146)
    Awww... A competitor's compiler is not optimized for our architecture. Cry me a river.

    There is a subtle difference between "not optimised" and "goes out of it's way to slow it down".

    A subtle, possibly criminal difference.
  • Re:Never (Score:5, Insightful)

    by slavemowgli ( 585321 ) on Tuesday July 12, 2005 @12:04PM (#13043205) Homepage
    They key point here is that in order to invoke Hanlon's razor, you have to be able to *adequately* explain the issue by assuming stupidity instead of malice, though. In other words, the explanation of the issue by means of stupidity must be reasonable; if you (as an unprejudiced, objective person) can instantly dismiss that explanation because it's obviously untrue, then Hanlon's razor does not apply.

    Now ask yourself again: do you believe that it's PURE COINCIDENCE that Intel's compiler produces slow code for its competitor's processors? Code that even a novice Assembler programmer would be able to improve instantly (see the rep movsb vs. rep movsd issue mentioned in a comment above, for example?) Do you believe that, for some funny reason, they never happened to notice? That noone ever complained to them about it? That they're really just an innocent victim here?

    Well, do you? If yes, please get back to me, I have a used car to sell you. :)
  • by Thagg ( 9904 ) <thadbeier@gmail.com> on Tuesday July 12, 2005 @12:05PM (#13043222) Journal
    in the compiler case, I don't think it is something they can legitimately complain about. Intel and AMD processors are actually different, and it appears that Intel has done some extremely aggressive optimization for their own processors. In particular, the pipeline length for the Intel processors are much longer, so instructions need to be scheduled differently to be optimal.

    That Intel hasn't done the same aggressive optimization for AMD processors can't be too surprising.

    Intel has hired some of the best compiler writers in the world (they had to, for the Itanium project) and have created a great compiler. Nothing is stopping AMD from doing the same thing.

    On the other hand, the "retroactive rebates" and innumerable other marketing techniques described in the article seem to be absolutely beyond the pale of antitrust laws. It is rampant abuse of the worst order. The pressures that they apply on various manufacturers and distributors are completely shameless, and are well documented. If the laws of this country are enforced (a big if!) then AMD has them dead to rights.

    Thad Beier
    Hammerhead Productions
  • Seriously, if you've still got the documentation, send that to AMD's legal team.

    That's a clear instance of them using their monopoly power to damage AMD's reputation with a developer (you).

    This *exactly* the sort of evidence they will be using to build their case.
  • by Anonymous Coward on Tuesday July 12, 2005 @12:07PM (#13043253)
    Intel is under no right to make their compiler work efficiently on AMD chips. They can't be expected to spend time on what compiler flags produce the best code on every AMD chip out there. So having it output generic code is the best bet. Of course, if that code is intentionally buggy, that's another issue.

    That said, binaries compiled on Intel run just fine on AMDs. Showing that those optimizations at least work on AMD, and AMD's version of IA32 is stable and good.

    Write your own compiler? Hell, AMD could dump a few mil on the FSF, and get GCC banged into shape. Someone on the GCC teams should approach them...

    Get some more features built into the new GCC 3.x optimization framework. It'd benefit not only AMD support, but everyone else as well, as the back-end would have more optimizations added/tweaked.

  • Part of AMD's claims is outrageous. Why would AMD expect its competitor, Intel, to write software that supports AMD's own products? We would not expect IBM to modify AIX or any other IBM software package to run on SPARC, which is a poorly designed processor.

    1. AMD's claim is that the Intel Compiler produces code that actively detects the AMD CPU, then intentionally runs slower code. That's not the same thing as Intel optimizing their compiler for the Pentium Architecture.

    2. If you think the SPARC is a poorly designed processor, you need your head checked.

    By restricting the GCC compilers to generating only a simple but fast subset of instructions, we could encourage both AMD and Intel to deprecate and, ultimately, eliminate the more complex x86 instructions. Linux and the bulk of open-source software use the GCC compilers and would provide a critical mass of support for a new streamlined transistor-count-reduced x86 chips. Here, I am thinking, "shockingly reduced in power due to using 1/3 of the transistors."

    Wouldn't that make the x86 Platform act like one of those "Poorly Designed RISC Processors" you were just complaining about?

    In any case, you won't see much of a transistor reduction. Most of the instructions you're trying to avoid are implemented in MicroCode and add no significant overhead to the chip. What *does* add all the transistors is the 20 stage pipeline, branch prediction, superscalar execution, Out Of Order instructions, etc, etc, etc.
  • by Gopal.V ( 532678 ) on Tuesday July 12, 2005 @12:10PM (#13043287) Homepage Journal
    > wouldn't there be programs all over that ran fine on Intel but crashed on AMD?

    Most Linux development is done using GCC , Most of windows with MSVC++. Only true hard-core inner-loop optimising geeks usually use Intel C/C++ compilers. These are people like game devs, crypto developers and HPC programmers.

    So yeah, there's a lot of code that doesn't work with Amd64 when compiled with ICC. But how many people build stuff on Amd64 with an Intel compiler ?. (remember this is not valid for stuff compiled on a pentium 4 but running on amd64)
  • Intel makes a compiler and a debugging aid for their chips. AMD should make one for theirs. It sucks to go to AMD's web page and they don't have nearly the developer resources that Intel has. If the GNU people can make a compiler for every fricking chip on the planet on their own dime, surely AMD can write a good C / C++ compiler for their chips.
  • not the same (Score:4, Insightful)

    by Mr. Underbridge ( 666784 ) on Tuesday July 12, 2005 @12:10PM (#13043300)
    Part of AMD's claims is outrageous. Why would AMD expect its competitor, Intel, to write software that supports AMD's own products? We would not expect IBM to modify AIX or any other IBM software package to run on SPARC, which is a poorly designed processor. Sun Microsystems can surely whine about IBM's tactics, and Sun has definitely whined. However, IBM is well within its rights to withhold software support.

    There's a difference between not supporting hardware and using your position to intentionally tank someone else's product. They have to go out of their way to make code execute crappy on AMD. If they were being chip-agnostic and it just didn't run on AMD, that would be different.

  • Part of AMD's claims is outrageous. Why would AMD expect its competitor, Intel, to write software that supports AMD's own products?

    The allegation is that Intel writes software that specifically detects AMD chips and then deliberately generates pessimal code that would run poorly on any processor.
  • by irieken ( 871019 ) on Tuesday July 12, 2005 @12:17PM (#13043378)
    It is one thing to not help a competitor, but to go out of your way to set them back is unethical. In this case, it appears that Intel programmed its compiler to give a non-Intel chip memcopy instructions that are far below the minimum standard of any chip capable of running current X86 code.
  • by BadDoggie ( 145310 ) on Tuesday July 12, 2005 @12:21PM (#13043421) Homepage Journal
    You've obviously forgotten (or more likely, never heard of) Ken Thompson [acm.org]. He was the guy that put the self-replicating backdoor in the UNIX compiler which, even if you removed from source, would be re-inserted if the compiler saw that you were compiling kernel or compiler.

    He did it to show that the further down you go, the harder it gets to detect such things. So you wrote a new compiler to get around that? Great. How're you planning on compiling it?

    Never forget that Open Source is no guarantee of security in and of itself.

    woof.

  • What a Maroon!

    Intel is producing a compiler that optimizes for Intel chips. Yup, memcpy() went south on a non-Intel chip/architecture. And, you found a work-around.

    Now, how is Intel to know the alignment behaviour of OTHER (proprietary) architectures. Yup, read the docs, etc. Same as you would.

    But, they are producing an optimizing compiler for the INTEL chip. Never claimed it optimized for AMD, or anything else. If you don't use the the correct target processor, I seriously think that would be your problem.

    Intel does NOT have a monopoly on processors (and, if it is proven in court that they do, THIS ANALYSIS WILL CHANGE). They certainly don't have a monopoly on compilers.

    I haven't seen ANY evidence that the ICC goes out of its way to crash other processors, but it CERTAINLY doesn't produce good code for them.

    Be happy with Visual C++, it generates good objects across a variety of Intel and AMD processors. Note that Intels claim has been that IF you use an Intel chip, ICC will provide a performance improvement.

    I think I am going to short AMD -- something is seriously amiss there...

    Ratboy.
  • Isn't Prescott 32 stages nowadays? Silly Intel. Gotta have the bigger pipeline, huh?

    Indeed. Only Crays and DSPs used to have pipelines that long. A single jump instruction, and you have to flush the entire pipeline! In super-computing and DSP, you almost never see a jump, so there's no concern. But in Intel's zeal to win the clock rate wars, they maxed out the pipeline to an absolutely ungodly length. And a 2.2 GHz AMD64 *still* outperforms a 3.2 GHz Pentium!

    Seems that Intel's P4 design backfired on them. Of course, that may be due to Intel's belief that the Itanium would take the market by storm. They did learn from their iAPX 432 chip by at least producing a method for emulating x86, but they failed to take into account how deeply entrenched the x86 performance crowd was. Now AMD64 is eating Intel's lunch! (Oops!)

    And as a person who's designed a simple (can't do too much in 10 weeks) 2-issue out of order machine, let me tell you, that's fun stuff. Really makes you appreciate how insanely complex real processors are. And don't even get me started on their branch prediction...

    I hear you. Trying to cram a reasonable chip into an FPGA can be quite a challenge. If MicroCode hadn't been invented, it might not be possible to fit one in so few transistors. At least we can finally stop the CISC vs. RISC debate. The MicroCode designs provide CISC instructions on top of RISC cores just to confuse the heck out of both sides. Next up, writing a VI clone in LISP! ;-)
  • by dbrutus ( 71639 ) on Tuesday July 12, 2005 @12:34PM (#13043588) Homepage
    It's very simple. If I were a programmer buying Intel compilers (I mostly do administrator work) would I have been reasonably led astray by their advertising to think that what Intel was selling was an X86 compiler that didn't play favorites? There's an enormous class action waiting out there for programmers who thought they were getting something (an honest x86 compiler) but werent and had to deal with user complaints from customers who suffered. There's a similar end user class action just waiting for an enterprising lawyer to set up.

    End users and programmers have no interest in supporting Intel processor dominance but were tricked into that by Intel's underhanded dealing.
  • by springbox ( 853816 ) on Tuesday July 12, 2005 @12:37PM (#13043640)
    It's one thing if you don't go out of your way to support an entirely different architecture that you don't make yourself, but it's entirely different to intentionally cripple your program when it finds out it's running on your competitor's hardware that's fully compatible with your own.
  • by RealityMogul ( 663835 ) on Tuesday July 12, 2005 @12:38PM (#13043654)
    Define "force the compiler". Is it a command line switch, or something else?
  • by Waffle Iron ( 339739 ) on Tuesday July 12, 2005 @12:41PM (#13043691)
    Why would AMD expect its competitor, Intel, to write software that supports AMD's own products?

    As others have pointed out, Intel allegedly went out of their way to secretly hobble code on AMD CPUs. Normally, there would be nothing wrong with pulling a dirty trick like this.

    However, this is an *anti trust* case. If you are hold a monopoly position in a market, you are prohibited from taking advantage of that position in various ways, and that may very well include this particular dirty trick.

  • by PhoenixPath ( 895891 ) on Tuesday July 12, 2005 @12:43PM (#13043720)
    Yeah...the fab they've been opening up apparently have nothing to do with capacity. Moron. AMD has more then enough capacity. The lawsuit is in an effort to make *use* of that capacity. Apple would have been a drop in thte bucket to AMD, but Apple needs chipsets as well, which is *one* of the reasons they chose Intel. Do some actual research before spewing FUD, okay?
  • by Gruneun ( 261463 ) on Tuesday July 12, 2005 @12:46PM (#13043761)
    who depend on sites like Slashdot to cull the most newsworthy items from the multitude of sites, mail lists, and other sources, it is news.

    Congratulations. You're on the gcc mailing list and the rest of us must now bow before your mad news reading skills. You are truly one to behold.
  • by Dan Berlin ( 682091 ) on Tuesday July 12, 2005 @12:47PM (#13043783)
    You don't get it.

    The Intel compiler (inlcuding the fortran one) is generating code that looks something like:

    if (processor == real intel processor && processor supports SSE/MMX/SSE2/SSE3)
    {
    Use super optimized code path using MMX/SSE/SSE2/SSE3
    }
    else
    {
    Use slower, stupid code path.
    }

    Instead of
    if (processor supports MMX/SSE/SSE2/SSE3)
    {
    Use super optimized code path using MMX/SSE/SSE2/SSE3
    }
    else
    {
    Use slower, stupid code path.
    }

    They do this *very specfically* to make sure that even though AMD supports the instructions it wants to execute, it won't use the fast path.

    This is not some accidental design where it was easier to do this. Intel's marketing folks basically told the compiler folks to do this, or so the story goes.

    If you were to patch the check at the beginning of your programs so that it returned true on AMD cpus as well, everything still works fine (in *all* cases), *and* it will run faster on AMD cpus.

    Try it. If you look at the posts above, someone has posted the variable you need to reset that it is checking.

  • by Anonymous Custard ( 587661 ) on Tuesday July 12, 2005 @12:52PM (#13043838) Homepage Journal
    But this altenate code path can run on any x86 chip. Isn't that what compatibility is useful for?

    The original code path can run on any x86 chip! Why was an alternate code path even created? Now, if the check said "if thiscpu_mmx_enabled == true, then use fast mmx path, else use slow non-mmx path" then it'd be a legitimate optimization with built in compatibility.

    But the compiler doesn't care whether a chip is capable or not, it just cares that it's Intel or not.
  • by dubbreak ( 623656 ) on Tuesday July 12, 2005 @12:54PM (#13043867)
    The mods are on crack, how you got modded up is beyond me.

    Part of AMD's claims is outrageous. Why would AMD expect its competitor, Intel, to write software that supports AMD's own products?
    Well it supports the x86 architecture. It doesn't have to support special features of AMD, but it should not purposely run different code (than it would on an intel proc) to crash the system. That's pushing the limit on anti-competitive, next thing you know ford is selling fuel that runs great in their cars but can tell if it's in a toyota and decides to spontaneously combust in the tank then.

    Oh yeah, on the SPARC note, you need to take a computer arch class if you think that they are poorly designed.. if anything the x86 arch is the biggest hack of all.

    On a related note, is there any way by which the authors of the GNU compiler collection (GCC) would limit the range of x86 instructions generated by GCC compilers....
    Once again you have obviously never taken any classes regarding the subject. So you want to force all cisc processors to become risc by changing gcc to only support simple instructions? (which are not necessarily faster, just look at the cycles some complex operations take then try to create something in asm that does the same in the same amount of cycles using only simple instructions). Have you forgotten that GCC is not the only compiler in the world? Did you not RTFA?! It's about the intel compiler for goodness sakes! If GCC was crippled as you suggest, no one would use it, end of story.

    Oh and less transistors on a chip? Brilliant. I assume you don't want faster computers or something. All the advanced branch prediction, out of order code execution etc that makes todays processors process that much faster than previous ones is thanks to the extra transistors.

    If you want to talk about how computer architecture should change, take at least one class in it. It is really interesting (believe it or not) and you would learn a lot about what has been tried and done and why certain choices were made.
  • by Anonymous Coward on Tuesday July 12, 2005 @01:00PM (#13043948)
    The accusation is not that "Intel hasn't done the same aggressive optimization for AMD processors". In fact, they did some aggressive DEOPTIMIZATION for AMD processors. That's not wrong, but it is wrong to do it, and then not tell the people that you did it. It's fraud, because Intel in convincing them to buy Intel processors based on false impressions and hidden information.

    Defrauding consumers is general tolerated in America, even much more blatent efforts. What surprises me is that Thad Beier is willing to ADVOCATE fraud, and help disguise it lies and spin, under his own name publically.

    Aren't you worried that in the future peole might google on your name and find this post ?
  • by hackstraw ( 262471 ) * on Tuesday July 12, 2005 @01:01PM (#13043954)
    Wow... that's a great example, and you should gather as much evidence of it as you can, especially Intel's responses, and send it to AMD's legal team.

    If I were Intel, I would respond with the product description of the Intel compiler, as found here http://www.intel.com/cd/software/products/asmo-na/ eng/compilers/clin/index.htm [intel.com] or here http://www.intelcompiler.com/ [intelcompiler.com].

    The product is clearly labeled as a high performance compiler for Intel CPUs. The grandparent used the wrong tool for the job which required a generic compiler.
  • by greed ( 112493 ) on Tuesday July 12, 2005 @01:02PM (#13043968)
    Intel is not detecting the supported instruction set, they are detecting the actual CPU.

    The way a responsible compiler developer generates code in this situation is to say, "I need feature X, Y and Z for this code path--it will be used if all are present."

    The only thing the latest Pentium IVs have on the Athlons is the SSE3 extensions, and that is pretty much irrelevant to most code. "It must be true, Intel told us."

    If you switch the Intel compiler so that it does NOT generate multiple-CPU-supporting code, you can generate code that runs on Pentium III, IV, and Athlon just fine. (My overly-cheap ECS Duron board burned out, and who cares about Duron anymore anyway?)

    (The magic switches are -xK or -xW, BTW.)

    But there is no reason for code targetting a Pentium IV restricted to SSE2 at the highest to NOT run on an Athlon. You can "not support" it, sure, but to DELIBERATELY disable the code when you detect a competitor's chip is... well, anti-competitive.

    And this isn't a free compiler. You pay for ICC. (There's a for-free-software download, sure, but most people who really care about this stuff are more than willing to pay, and pay well, for the best compiler optimizations they can get.)

    The problem is not that they can't guarantee that the AMD chips work. The problem is they are generating instruction streams that run JUST FINE on AMD chips and their runtime code DISABLES that code path (if you use the recommended or default compiler settings).

    It's AMD's job to make sure their implementation of IA32 + whatever extensions is good, not Intel's job to disable code on their chips--except based on the processor capability word. (Whatever "flags" from /proc/cpuinfo is properly called.)

  • *grabs popcorn* (Score:3, Insightful)

    by Glog ( 303500 ) on Tuesday July 12, 2005 @01:03PM (#13043970)
    Well, one this is for sure - it will be fun to watch those lawyers explain compiler theory to the jury!
  • by EXTomar ( 78739 ) on Tuesday July 12, 2005 @01:03PM (#13043979)
    Why doesn't AMD release their *own* compiler? On a AMD tuned compiler I bet the performance isn't so great for on an Intel processor.

    This is a case where a compiler can go "if it is a 'processor-type-a' use these instructions otherwise use something else". I don't see any fault here. Intel has created a compiler that uses their chip's optimal settings. An efficient instruction set of instructions for a P4 will not be the same for an Athlon anyway due to internals of both chips being different. Why would anyone believe otherwise?

    Unless Intel is pushing their compiler as the end all be all compiler for AMD there is nothing goofy going on. It is just like using GCC and C code with a bunch of carefully chosen extensions. Expecting these extensions and assembly modifications to work the same on every x86 chip is a pipedream.
  • by jiushao ( 898575 ) on Tuesday July 12, 2005 @01:07PM (#13044023)
    I don't see any problem at all with this if it is indeed for all non-intel processors. Targeting a competitor directly by slowing things down is a bad thing, but putting in the simplest default fallback for any other processors than the one you are trying to optimize for seems like a very reasonable way to go. To put it this way; Intel makes a compiler optimized for their products, and they throw in a simple fallback to supply simple code that should work on any basic x86 compatible. If it can be demonstrated that the intent of this is to damage AMD it is a bad thing, but it seems more likely that Intel simply does not care about the performance of the compiler on any other implementation (and seeing how they by no means have a monopoly on compilers there is nothing wrong with that).
  • by pixelbeat ( 31557 ) <P@draigBrady.com> on Tuesday July 12, 2005 @01:16PM (#13044123) Homepage
    Here's a script to auto gen those options for gcc:
    http://www.pixelbeat.org/scripts/gcccpuopt [pixelbeat.org]
  • by Edgewize ( 262271 ) on Tuesday July 12, 2005 @01:18PM (#13044150)
    What people seem to be saying is that by patching the binary to force the P4 path, there is a significant performance increase on the Athlon. In other words, even though the P4-optimization is not optimal for the Athlon, it exceeds the performance of the "baseline" path and there is no reason to disable it -- other than to cripple AMD's performance.
  • Re: Loop Unrolling (Score:2, Insightful)

    by Lobachevsky ( 465666 ) on Tuesday July 12, 2005 @01:38PM (#13044384)
    The larger pipelines are also in anticipation of most compilers performing inlining and loop unrolling, in which case, many asm instructions will occur in sequence without any branching.
  • by 10Ghz ( 453478 ) on Tuesday July 12, 2005 @01:49PM (#13044517)
    Pretty much anyone who wants fast 32Bit code uses the Intel Compilers, even on AMD


    yes, ICC generates faster code even on AMD-CPU's than GCC (for example) does. But that's not the point AMD is making. AMD claims that ICC detects whether the CPU is an AMD-CPU. If it is, it generates slower executables, even though there's no real technical reason to do so. It does so merely to put AMD at a disadvantage. Yes, the code might still be faster than GCC-generated code (you could say that it tells quite a bit about GCC as well....), but it's still crippled when compared to Intel-code.
  • Speaking of gcc... (Score:1, Insightful)

    by Anonymous Coward on Tuesday July 12, 2005 @02:03PM (#13044677)
    How involved in gcc development has AMD been? I'd love for them to contribute heavily toward making gcc-produced code fly on AMD64 cpus.

    It would be great if gcc were the reference compiler for AMD64.
  • by Nogami_Saeko ( 466595 ) on Tuesday July 12, 2005 @02:41PM (#13045103)
    It's not so much a matter of making an optimized compiler, it's a matter of a compiler specifically crippling itself if "genuineintel" isn't detected.

    What they SHOULD be doing is checking the supported features of the chip and enabling the extensions dynamically as the features are available or not.

    To just say "oh, it's not Intel, therefore we'll just use a standard x86 instruction set, no matter what the chip reports it's actually capable of" is the kind of BS that gets companies in hot water. If they want to prove how good their CPU is, then they should be trying to do that as fairly as possible. Playing compiler tricks will only fool people in the shortterm and will catch up with them...

    N.
  • Re:Work on GCC! (Score:1, Insightful)

    by Anonymous Coward on Tuesday July 12, 2005 @03:25PM (#13045652)
    AMD does work on developing GCC, to an extent. I mean, how do you think x86-64 support came about? Through magic? Even if they didn't necessarily assign the whole compiler division to turn out an AMD-branded compiler (which, after all, would run contrary to the point, and they don't have Intel-like resources in this regard anyway), they've provided plenty of technical help in an effort to make x86-64 the success it is. The compiler support was available well before the chips came out.

    I think the main problem is the goal of GCC isn't necessarily to be the fastest compiler out there, but rather the most portable and correct one. Hence why they eschew machine-specific optimizations for more generic ones whenever possible. The Intel compiler is more in the mold of traditional vendor-supplied compilers, which try to get as much performance out of their hardware as possible, at whatever the cost in terms of microoptimizations and even correctness. If AMD tried to submit a bunch of AMD-specific optimizations for GCC, they'd probably be shot down.
  • by lp-habu ( 734825 ) on Tuesday July 12, 2005 @03:30PM (#13045723)
    Quit being so god damn picky, so it was in AAC not MP3 the point is still valid and accurate nitpicky dumbass moron. Yes flamebait was intentional and it was deserved for the sheer stupidity.
    The mistake was yours, not his. Typically it is the one who makes the mistake who can legitimately claim the "stupid" title. Why get so upset? And assuming that you were talking about AAC files, which non-Apple AAC players were made to crash by the free AAC files? I must have missed that.
  • by xenocide2 ( 231786 ) on Tuesday July 12, 2005 @03:50PM (#13046061) Homepage
    The irony being that if you run their "for Intel CPU" code on AMD, you also get performance benefits, implying that perhaps the optimizations are not founded in design but rather business relationships.
  • by m50d ( 797211 ) on Tuesday July 12, 2005 @04:09PM (#13046422) Homepage Journal
    RTFPage you link to. The compiler "exploits the Intel® MMX technology and streaming-SIMD-extensions (SSE/SSE2/SSE3) for IA-32 processors". (My emphasis). IA-32 is the processor architecture, AMD cpus are IA-32. They have the extensions, so the compiler as advertised should produce code that exploits them.
  • by Dun Malg ( 230075 ) on Tuesday July 12, 2005 @05:31PM (#13047518) Homepage
    Well, then why do they make compiled code work at all on AMD chips?

    Because then nobody would use their compiler at all. They wanted to subtly punish buyers of AMD CPUs, not drive away compiler customers.

  • by Jherek Carnelian ( 831679 ) on Tuesday July 12, 2005 @05:32PM (#13047529)
    On any non-Intel processors,

    I think this is a key fact.

    It isn't that ICC generates crummy code for AMD cpus, it generates good code for Intel cpus and crummy code for all others.

    AMD would have a much stronger case if they were able to demonstrate that ICC compiled code actively detected AMD cpus and took the slowpath.

    Instead, it is reasonable for Intel to argue that the slowpath is a fallback option that is designed for maximum compatibility at the expense of performance. Since they take the same slowpath on ALL unrecognized CPUs (cyrix, transmeta, ???) some, or all, of which may not have been part of Intel's test process -- maximum compatibility is a very reasonable design goal, better than simply refusing to run which is another option.

    The end result is the same, but the supporting reasoning behind such a move is likely to prevail in a court of law where, in a dispute like this, motivation makes all the difference.
  • by Electroly ( 708000 ) on Tuesday July 12, 2005 @05:39PM (#13047622)
    Why does everyone expect Intel to have an *obligation* to write optimizations in THEIR COMPILER for a COMPETITOR'S chip? And they don't specifically check for AMD and write bogus code if so -- quite the opposite. They check if they're running on Intel, and if so they put in faster code that's specifically designed for Intel processors. I'm not seeing the problem here. This lawsuit should be thrown out. This is like suing OpenOffice for having full support of their own file format, but "DISCRIMINATING" against Microsoft Word by not supporting it as well.
  • by Kazymyr ( 190114 ) on Tuesday July 12, 2005 @06:00PM (#13047836) Journal
    So is the issue with the compiler at compile time or at runtime? In other words, is it:

    a. compile on an AMD CPU, compiler detects that it runs on an AMD and generates a binary that runs slower on both AMD and Intel CPUs, or...

    b. compile anywhere, generated binary checks whether it runs on Intel or AMD and runs slower on AMD?

    First one is easy to check for - compile the same source on each of the 2 architectures and compare binaries. If not the same, QED. The second one is sneakier and needs debug/tracing.
  • by the_greywolf ( 311406 ) on Tuesday July 12, 2005 @06:34PM (#13048168) Homepage
    But let's be clear: Intel would be perfectly within their rights to make a generic non-Intel option which functions at the level of the safest (albeit slowest) common denominator. To begin to optimize and troubleshoot for alternate (competitor's) chips would be an absurd project for Intel to invest resources in. The question is this: Is AMD uniquely singled out here by the Intel compiler? (By name?) Or does the Intel compiler check the CPUID for a simple boolean of Intel or non-Intel.

    according to this guy [swallowtail.org], it is in fact a boolean test of Intel/non-Intel. correct me if i'm wrong, but AMD is the only competing company to provide an SE2 solution, so i would go as far as to say this is singling them out. the Fortran compiler 7.1 executes a mov $0x1, 0x0 in the case of non-Intel chips, regardless of SSE support. compiler 8.0+ executes SSE instructions in the case of existing SSE support, optimized SSE2 instructions on Intel chips supporting it, and crippled SSE support on non-Intel ships.

    if AMD is the only other provider of an SSE2-supporting chip, this could easily be construed as singling-out.

  • Re:Wow (Score:2, Insightful)

    by LarsG ( 31008 ) on Tuesday July 12, 2005 @06:38PM (#13048205) Journal
    If the comments and links I've read are correct, the check is like this:

    If (GenuineIntel)
    { supported_extentions = Check_CPU_Capabilities();
    Run_optimised_code(supported_extentions);
    }
    else
    { Run_generic_x86_code(); }

    So on any non-Intel CPU, the generic x86 code path will be chosen, but on Intel it will use the best supported (MMX/SSE/etc) code path.

    So no specific test for AMD, but at the same time 'willful ignorance' of the x86 extensions supported by non-Intel CPUs. Definately not playing nice, and something that Intel compiler customers certainly are in their right to complain about. But I kind of doubt that it is illegal for Intel to do so, unless there is supporting evidence of Intel going beyond generic x86 in sabotaging AMD CPUs (e.g. generic x86 code especially crafted to run bad on AMD CPUs, smoking gun internal emails etc).

    Being an AMD only customer for the last 5 years, I hope AMD has facts to back their claim.
  • by Panaflex ( 13191 ) <<convivialdingo> <at> <yahoo.com>> on Wednesday July 13, 2005 @02:29AM (#13051029)
    Someone else may feel free to chime in, but it does seem suspicious or, at the least, a conflict of interest that the fines go to the authorities in Europe, while they go to the competitors (treble damages) in the US?

    As far as I know, the European laws are designed to protect the Public. Therefor, the "public" - through the form of its government, receives the damages. Correct me if I'm wrong here though.
  • by SwiftWind ( 774249 ) on Wednesday July 13, 2005 @08:54AM (#13052297)
    Regardless of who has better chips and regardless of what capitalism is all about. Having a healthy competition is one thing. However, Intel taking the roll of the punisher when AMD is involved is another. You want more sales? Then as usual, try to outdo AMD by benchmarks. What this boils down to is its the customer's choice of who they wish to go with, not Intel's. When Intel begins to start forcing/punishing the user to go with their products, then someone needs to step in because the customer should never lose the right to choose.

8 Catfish = 1 Octo-puss

Working...