[Bug target/21588] New: x86 machine builtins do not have any const/pure attributes set
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun May 15 17:50:00 GMT 2005
Consider this snippet:
typedef float v4sf __attribute__ ((vector_size (16)));
float global;
float
waste_global (float p[4])
{
__builtin_ia32_loadups (p);
global += 1.0;
}
GCC now thinks __builtin_ia32_loadups clobbers global:
waste_global (pD.1564)
{
floatD.28 D.1568;
floatD.28 global.0D.1567;
# BLOCK 0
# PRED: ENTRY [100.0%] (fallthru,exec)
# globalD.1563_6 = V_MAY_DEF <globalD.1563_2>;
__builtin_ia32_loadups (pD.1564_1);
# VUSE <globalD.1563_6>;
global.0D.1567_3 = globalD.1563;
D.1568_4 = global.0D.1567_3 + 1.0e+0;
# globalD.1563_5 = V_MUST_DEF <globalD.1563_6>;
globalD.1563 = D.1568_4;
return;
# SUCC: EXIT [100.0%]
}
This is a bit silly, if we encourage people to use builtins instead
of inline assembly.
--
Summary: x86 machine builtins do not have any const/pure
attributes set
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: steven at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org,hubicka at gcc dot gnu
dot org,rth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21588
More information about the Gcc-bugs
mailing list