From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29965 invoked by alias); 7 Dec 2006 20:48:16 -0000 Received: (qmail 29933 invoked by uid 48); 7 Dec 2006 20:48:06 -0000 Date: Thu, 07 Dec 2006 20:48:00 -0000 Message-ID: <20061207204806.29932.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/30038] Call to sin(x), cos(x) should be transformed to sincos(x) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-12/txt/msg00647.txt.bz2 ------- Comment #14 from rguenth at gcc dot gnu dot org 2006-12-07 20:48 ------- sincos is not being used because we don't see that time is not aliased by the writes to strain_tensor: # VUSE ; time.463_952 = time; D.3397_953 = time.463_952 * 6.283185307000000108246240415610373020172119140625e+0; D.3398_954 = D.3397_953 * D.3396_951; D.3399_955 = __builtin_sin (D.3398_954); coefficient_956 = D.3394_948 * D.3399_955; D.3279_957 = pretmp.823_106643; D.3400_958 = pretmp.824_106641; D.3407_969 = poissons_ratio_841 * coefficient_956; D.3408_970 = -D.3407_969; D.5048_106405 = (real8 *) ivtmp.923_106427; # SMT.774_10649 = V_MAY_DEF ; MEM[base: D.5048_106405, offset: -72B] = D.3408_970; D.5049_5994 = (real8 *) ivtmp.923_106427; # SMT.774_10650 = V_MAY_DEF ; MEM[base: D.5049_5994, offset: -40B] = D.3408_970; D.5050_6098 = (real8 *) ivtmp.923_106427; # SMT.774_10651 = V_MAY_DEF ; MEM[base: D.5050_6098, offset: -8B] = coefficient_956; D.5051_106649 = () n_lsm.835_6013; D.5052_106648 = (real8 *) D.5051_106649; D.5053_5998 = D.5052_106648 * -8B; D.5054_6102 = (real8 *) ivtmp.920_106432; D.5055_106892 = D.5053_5998 + D.5054_6102; D.5056_106891 = (int8) n_lsm.835_6013; D.5057_106890 = (real8 *) D.5056_106891; # VUSE ; D.3267_1009 = MEM[base: D.5055_106892, index: D.5057_106890, step: 8B, offset: -8B]; # VUSE ; radius_of_curvature.466_1010 = radius_of_curvature; D.3394_1011 = D.3267_1009 / radius_of_curvature.466_1010; # VUSE ; time.463_1015 = time; D.3397_1016 = time.463_1015 * 6.283185307000000108246240415610373020172119140625e+0; D.3398_1017 = D.3397_1016 * D.3396_951; D.3416_1018 = __builtin_cos (D.3398_1017); which is because strain_tensor is allocated like allocate (strain_tensor(3,3,number_of_sample_points)) and the gfortran allocate does not have DECL_IS_MALLOC as it has the not supported interface 'void allocate (void**, int)'. Would we be able to translate this 'allocate' call by using 'internal_malloc' it would get a different aliasing tag and just work. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30038